From 3c100ecf208c35ba7cb6bc284b17a7849dcdb88c Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Mon, 6 Mar 2017 17:17:03 -0500 Subject: [PATCH] minor --- appveyor.yml | 3 +-- build.sh | 50 +++++++++++++++++++++++++++++++++----------------- prebuild.sh | 2 +- 3 files changed, 35 insertions(+), 20 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 21226e5d1..b89ec2395 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,8 +40,7 @@ build_script: # for debugging, see what was built - python zip_daemon.py - dir dist - - pip install PyGithub uritemplate - - pip install -U requests[security] + - pip install -r requirements.txt - python release_on_tag.py test: off diff --git a/build.sh b/build.sh index 1a9c56b9e..5b03bde9f 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/bin/bash -set -o xtrace -set -eu +set -euo pipefail +set -x ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$ROOT" @@ -34,30 +34,52 @@ if [ "$FULL_BUILD" == "true" ]; then python "$ROOT/set_build.py" fi +rm -rf "$ROOT/app/dist" + npm install -( - cd "$ROOT/app" - npm install -) + +#################### +# lbrynet-daemon # +#################### ( cd "$ROOT/lbrynet-daemon" pip install -r linux_macos.txt 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" npm install node_modules/.bin/node-sass --output dist/css --sourcemap=none scss/ node_modules/.bin/webpack - rm -rf "$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 [ "$(uname)" == "Darwin" ]; then security unlock-keychain -p ${KEYCHAIN_PASSWORD} osx-build.keychain @@ -66,15 +88,9 @@ if [ "$FULL_BUILD" == "true" ]; then node_modules/.bin/build -p never python zip_daemon.py + deactivate + echo 'Build and packaging complete.' else echo 'Build complete. Run `./node_modules/.bin/electron app` to launch the app' -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 +fi \ No newline at end of file diff --git a/prebuild.sh b/prebuild.sh index 747203a10..bd3501bc7 100755 --- a/prebuild.sh +++ b/prebuild.sh @@ -29,10 +29,10 @@ cmd_exists() { set +eu GITUSERNAME=$(git config --global --get user.name) -GITEMAIL=$(git config --global --get user.email) if [ -z "$GITUSERNAME" ]; then git config --global user.name "$(whoami)" fi +GITEMAIL=$(git config --global --get user.email) if [ -z "$GITEMAIL" ]; then git config --global user.email "$(whoami)@lbry.io" fi