This commit is contained in:
Alex Grintsvayg 2017-03-06 17:17:03 -05:00
parent abbcbfefd7
commit 3c100ecf20
3 changed files with 35 additions and 20 deletions

View file

@ -40,8 +40,7 @@ build_script:
# for debugging, see what was built # for debugging, see what was built
- python zip_daemon.py - python zip_daemon.py
- dir dist - dir dist
- pip install PyGithub uritemplate - pip install -r requirements.txt
- pip install -U requests[security]
- python release_on_tag.py - python release_on_tag.py
test: off test: off

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
set -o xtrace set -euo pipefail
set -eu set -x
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$ROOT" cd "$ROOT"
@ -34,30 +34,52 @@ if [ "$FULL_BUILD" == "true" ]; then
python "$ROOT/set_build.py" python "$ROOT/set_build.py"
fi fi
rm -rf "$ROOT/app/dist"
npm install npm install
(
cd "$ROOT/app" ####################
npm install # lbrynet-daemon #
) ####################
( (
cd "$ROOT/lbrynet-daemon" cd "$ROOT/lbrynet-daemon"
pip install -r linux_macos.txt pip install -r linux_macos.txt
pyinstaller -y lbry.onefile.spec pyinstaller -y lbry.onefile.spec
) )
if [ "$FULL_BUILD" == "true" ]; then
# electron-build has a publish feature, but I had a hard time getting
# it to reliably work and it also seemed difficult to configure. Not proud of
# this, but it seemed better to write my own.
python release_on_tag.py
fi
mv "$ROOT/lbrynet-daemon/dist/lbrynet-daemon" "$ROOT/app/dist"
############
# UI #
############
( (
cd "$ROOT/lbry-web-ui" cd "$ROOT/lbry-web-ui"
npm install npm install
node_modules/.bin/node-sass --output dist/css --sourcemap=none scss/ node_modules/.bin/node-sass --output dist/css --sourcemap=none scss/
node_modules/.bin/webpack node_modules/.bin/webpack
rm -rf "$ROOT/app/dist"
cp -r dist "$ROOT/app/dist" cp -r dist "$ROOT/app/dist"
) )
mv "$ROOT/lbrynet-daemon/dist/lbrynet-daemon" "$ROOT/app/dist"
###################
# Build the app #
###################
(
cd "$ROOT/app"
npm install
)
if [ "$FULL_BUILD" == "true" ]; then if [ "$FULL_BUILD" == "true" ]; then
if [ "$(uname)" == "Darwin" ]; then if [ "$(uname)" == "Darwin" ]; then
security unlock-keychain -p ${KEYCHAIN_PASSWORD} osx-build.keychain security unlock-keychain -p ${KEYCHAIN_PASSWORD} osx-build.keychain
@ -66,15 +88,9 @@ if [ "$FULL_BUILD" == "true" ]; then
node_modules/.bin/build -p never node_modules/.bin/build -p never
python zip_daemon.py python zip_daemon.py
deactivate
echo 'Build and packaging complete.' echo 'Build and packaging complete.'
else else
echo 'Build complete. Run `./node_modules/.bin/electron app` to launch the app' echo 'Build complete. Run `./node_modules/.bin/electron app` to launch the app'
fi fi
if [ "$FULL_BUILD" == "true" ]; then
# electron-build has a publish feature, but I had a hard time getting
# it to reliably work and it also seemed difficult to configure. Not proud of
# this, but it seemed better to write my own.
python release_on_tag.py
deactivate
fi

View file

@ -29,10 +29,10 @@ cmd_exists() {
set +eu set +eu
GITUSERNAME=$(git config --global --get user.name) GITUSERNAME=$(git config --global --get user.name)
GITEMAIL=$(git config --global --get user.email)
if [ -z "$GITUSERNAME" ]; then if [ -z "$GITUSERNAME" ]; then
git config --global user.name "$(whoami)" git config --global user.name "$(whoami)"
fi fi
GITEMAIL=$(git config --global --get user.email)
if [ -z "$GITEMAIL" ]; then if [ -z "$GITEMAIL" ]; then
git config --global user.email "$(whoami)@lbry.io" git config --global user.email "$(whoami)@lbry.io"
fi fi