Skip to content

Commit

Permalink
Add prepare_deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomolicari committed Jun 20, 2018
1 parent ec8d1fc commit 7f1863d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ script:
- npm run test-dapp
- npm run test
before_deploy:
- if [[ "$DIST" == "desktop" ]] && [[ "$TRAVIS_BRANCH" == "develop" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd dapp/ && mkdir dist && npm run build-linux; fi
- if [[ "$DIST" == "desktop" ]] && [[ "$TRAVIS_BRANCH" == "develop" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd dapp/ && mkdir dist && npm run build-osx; fi
- if [[ "$DIST" == "web" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then rm -rf dapp/node_modules/electron* dapp/node_modules/http-server dapp/node_modules/grunt* dapp/node_modules/webpack dapp/node_modules/karma* dapp/node_modules/babel* ; fi
- sh prepare_deploy.sh
deploy:
- provider: s3
bucket: wallet-development
Expand Down
26 changes: 26 additions & 0 deletions prepare_deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ENABLED_BRANCH = "develop"

echo "=== PREPARE DEPLOY ==="

if [[ "$DIST" == "desktop" ]] && [[ "$TRAVIS_BRANCH" == "$ENABLED_BRANCH" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cd dapp/ && mkdir dist && npm run build-linux;
if [[ "$TRAVIS_BRANCH" == "$TRAVIS_TAG"]]; then
# it is a TAG
mv multisigweb*.deb multisigweb-$TRAVIS_TAG.deb
fi
fi

if [[ "$DIST" == "desktop" ]] && [[ "$TRAVIS_BRANCH" == "$ENABLED_BRANCH" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cd dapp/ && mkdir dist && npm run build-osx;
if [[ "$TRAVIS_BRANCH" == "$TRAVIS_TAG"]]; then
# it is a TAG
mv multisigweb*-mac.zip multisigweb-$TRAVIS_TAG-mac.zip
mv multisigweb*.dmg multisigweb-$TRAVIS_TAG.dmg
fi
fi

if [[ "$DIST" == "web" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
rm -rf dapp/node_modules/electron* dapp/node_modules/http-server dapp/node_modules/grunt* dapp/node_modules/webpack dapp/node_modules/karma* dapp/node_modules/babel*;
fi

echo "=== PREPARE DEPLOY DONE ==="

0 comments on commit 7f1863d

Please sign in to comment.