Auto-bump js-precompiled on release (#2828)

* Auto-bump js-precompiled on release

* [ci skip] js-precompiled 20161022-232245

* Remove old GitLab tests

* Only move file.ext (get rid of error)

* allow add, commit & push failures (auto-bump)
This commit is contained in:
Jaco Greeff 2016-10-25 09:36:42 +02:00 committed by Gav Wood
parent cf67ed964e
commit 285727e2fd
3 changed files with 32 additions and 18 deletions

View File

@ -316,7 +316,6 @@ js-release:
stage: build stage: build
image: ethcore/javascript:latest image: ethcore/javascript:latest
only: only:
- js
- master - master
- beta - beta
- tags - tags

View File

@ -6,6 +6,7 @@ cd ..
# run build (production) and store the exit code # run build (production) and store the exit code
EXITCODE=0 EXITCODE=0
rm -rf .build
npm run ci:build || EXITCODE=1 npm run ci:build || EXITCODE=1
# back to root # back to root

View File

@ -1,6 +1,14 @@
#!/bin/bash #!/bin/bash
set -e set -e
# 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 "jaco+gitlab@ethcore.io"
git config user.name "GitLab Build Bot"
}
# change into the build directory # change into the build directory
pushd `dirname $0` pushd `dirname $0`
cd ../.build cd ../.build
@ -10,7 +18,7 @@ UTCDATE=`date -u "+%Y%m%d-%H%M%S"`
# Create proper directory structure # Create proper directory structure
mkdir -p build mkdir -p build
mv * build || true mv *.* build
mkdir -p src mkdir -p src
# Copy rust files # Copy rust files
@ -22,13 +30,8 @@ cp ../src/lib.rs* ./src/
rm -rf ./.git rm -rf ./.git
git init git init
# our user details
git config push.default simple
git config merge.ours.driver true
git config user.email "jaco+gitlab@ethcore.io"
git config user.name "GitLab Build Bot"
# add local files and send it up # add local files and send it up
setup_git_user
git remote add origin https://${GITHUB_JS_PRECOMPILED}:@github.com/ethcore/js-precompiled.git git remote add origin https://${GITHUB_JS_PRECOMPILED}:@github.com/ethcore/js-precompiled.git
git fetch origin git fetch origin
git checkout -b $CI_BUILD_REF_NAME git checkout -b $CI_BUILD_REF_NAME
@ -40,5 +43,16 @@ git push origin $CI_BUILD_REF_NAME
# back to root # back to root
popd popd
# bump js-precompiled
cargo update -p parity-ui-precompiled
# add to git and push
setup_git_user
git remote set-url origin https://${GITHUB_JS_PRECOMPILED}:@github.com/ethcore/parity.git
git fetch origin
git add . || true
git commit -m "[ci skip] js-precompiled $UTCDATE" || true
git push origin || true
# exit with exit code # exit with exit code
exit 0 exit 0