openethereum/js/scripts/release.sh
Arkadiy Paronyan de23d7a2d7 Backporting to beta (#3525)
* v1.4.4

* Fixing tests, fixing refreshing precompiled (#3483)

* Fixing tests, fixing refreshing precompiled

* Commit only js and Cargo.lock

* Moving commands to the right place

* Adding js content as well

* Wallet names shouldn't include address.

(Actually wallet files shouldn't contain it either, but we'll
leave that for a later PR).

* sudo -c Is not supported on Mac

* Add trace_{call, rawTransaction, replayTransaction}

* Remove dangling only

* check for sanity

* Better Erros Snackbar in UI #3473

* Sync bandwidth optimization

* Updated sync algo desription

* Check transaction signature when adding to the queue

* Limit sync reorg to 20 blocks (#3519)

* Limit sync reorg

* Fixed tests

* updated the european warp bootnode addresses (#3528)

* Fix dapp account selection (#3399)

* Fix GHH accounts (filter non accounts)

* SignatureReg handle undefined ABI names gracefully

* SignatureReg fix accounts (filter non accounts)

* TokenReg fix accounts (filter non accounts)

* Registry fix accounts (filter non accounts)

* Remove addresses, display non-refundable warning (#3403)

* Use Contract owner for unregistering Token #3440

* Make tokenreg dapp fast again (#3474)

* Using proper TokenReg Instance in TokenReg dApp #3371

* remove unnecessary logs in tokereg dapp

* Improved Redux managment in TokeReg dApp #3371

* Fixfing linting


Former-commit-id: 3e0d033eaf789cfdf517f4a97effc500f1f9263b
2016-11-18 20:50:20 +01:00

87 lines
2.1 KiB
Bash
Executable File

#!/bin/bash
set -e
# variables
UTCDATE=`date -u "+%Y%m%d-%H%M%S"`
PACKAGES=( "parity.js" )
BRANCH=$CI_BUILD_REF_NAME
GIT_JS_PRECOMPILED="https://${GITHUB_JS_PRECOMPILED}:@github.com/ethcore/js-precompiled.git"
GIT_PARITY="https://${GITHUB_JS_PRECOMPILED}:@github.com/ethcore/parity.git"
# setup the git user defaults for the current repo
function setup_git_user {
git config push.default simple
git config merge.ours.driver true
git config user.email "$GITHUB_EMAIL"
git config user.name "GitLab Build Bot"
}
# change into the build directory
BASEDIR=`dirname $0`
GITLOG=./.git/gitcommand.log
pushd $BASEDIR
cd ../.dist
# add local files and send it up
echo "*** Setting up GitHub config for js-precompiled"
rm -rf ./.git
git init
setup_git_user
echo "*** Checking out $BRANCH branch"
git remote add origin $GIT_JS_PRECOMPILED
git fetch origin 2>$GITLOG
git checkout -b $BRANCH
echo "*** Committing compiled files for $UTCDATE"
git add .
git commit -m "$UTCDATE"
echo "*** Merging remote"
git merge origin/$BRANCH -X ours --commit -m "$UTCDATE [release]"
git push origin HEAD:refs/heads/$BRANCH 2>$GITLOG
PRECOMPILED_HASH=`git rev-parse HEAD`
# move to root
cd ../..
echo "*** Setting up GitHub config for parity"
setup_git_user
git remote set-url origin $GIT_PARITY
git reset --hard origin/$BRANCH 2>$GITLOG
if [ "$BRANCH" == "master" ]; then
cd js
echo "*** Bumping package.json patch version"
npm --no-git-tag-version version
npm version patch
echo "*** Building packages for npmjs"
# echo -e "$NPM_USERNAME\n$NPM_PASSWORD\n$NPM_EMAIL" | npm login
echo "$NPM_TOKEN" >> ~/.npmrc
npm run ci:build:npm
echo "*** Publishing $PACKAGE to npmjs"
cd .npmjs
npm publish --access public
cd ../..
fi
echo "*** Updating cargo parity-ui-precompiled#$PRECOMPILED_HASH"
git submodule update
cargo update -p parity-ui-precompiled
# --precise "$PRECOMPILED_HASH"
echo "*** Committing updated files"
git add js
git add Cargo.lock
git commit -m "[ci skip] js-precompiled $UTCDATE"
git push origin HEAD:refs/heads/$BRANCH 2>$GITLOG
# back to root
echo "*** Release completed"
popd
# exit with exit code
exit 0