mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
set the build type
This commit is contained in:
parent
9a21135223
commit
4763d29a4c
4 changed files with 33 additions and 2 deletions
|
@ -10,7 +10,8 @@ clone_folder: C:\projects\lbry-electron
|
||||||
install:
|
install:
|
||||||
# needed to deal with submodules
|
# needed to deal with submodules
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
- python set-version.py
|
- python set_version.py
|
||||||
|
- python set_build.py
|
||||||
# Get the latest stable version of Node.js or io.js
|
# Get the latest stable version of Node.js or io.js
|
||||||
- ps: Install-Product node $env:nodejs_version
|
- ps: Install-Product node $env:nodejs_version
|
||||||
# install modules
|
# install modules
|
||||||
|
|
3
build.sh
3
build.sh
|
@ -30,7 +30,8 @@ if [ "$FULL_BUILD" == "true" ]; then
|
||||||
source "$VENV/bin/activate"
|
source "$VENV/bin/activate"
|
||||||
set -u
|
set -u
|
||||||
pip install -U pip setuptools pyinstaller
|
pip install -U pip setuptools pyinstaller
|
||||||
python set-version.py
|
python set_version.py
|
||||||
|
python set_build.py
|
||||||
fi
|
fi
|
||||||
|
|
||||||
npm install
|
npm install
|
||||||
|
|
29
set_build.py
Normal file
29
set_build.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
"""Set the build version to be 'dev', 'qa', 'rc', 'release'"""
|
||||||
|
|
||||||
|
import json
|
||||||
|
import os.path
|
||||||
|
import re
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
build = get_build()
|
||||||
|
with open(os.path.join('lbry', 'lbrynet', 'build_type.py'), 'w') as f:
|
||||||
|
f.write('BUILD = "{}"'.format(build))
|
||||||
|
|
||||||
|
|
||||||
|
def get_build():
|
||||||
|
try:
|
||||||
|
tag = subprocess.check_output(['git', 'describe', '--exact-match']).strip()
|
||||||
|
if re.match('v\d+\.\d+\.\d+rc\d+', tag):
|
||||||
|
return 'rc'
|
||||||
|
else:
|
||||||
|
return 'release'
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
# if the build doesn't have a tag
|
||||||
|
return 'qa'
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(main())
|
Loading…
Add table
Reference in a new issue