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
- 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

View file

@ -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

View file

@ -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