From 285727e2fd26f7a53a932e105581d00e1c66ab27 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 25 Oct 2016 09:36:42 +0200 Subject: [PATCH] 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) --- .gitlab-ci.yml | 21 ++++++++++----------- js/scripts/build.sh | 1 + js/scripts/release.sh | 28 +++++++++++++++++++++------- 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2a8c515f8..7a13531b3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ stages: - test variables: GIT_DEPTH: "3" - SIMPLECOV: "true" + SIMPLECOV: "true" RUST_BACKTRACE: "1" RUSTFLAGS: "-D warnings" cache: @@ -21,7 +21,7 @@ linux-stable: - cargo build --release --verbose - strip target/release/parity - md5sum target/release/parity >> parity.md5 - - aws configure set aws_access_key_id $s3_key + - aws configure set aws_access_key_id $s3_key - aws configure set aws_secret_access_key $s3_secret - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/parity --body target/release/parity - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/parity.md5 --body parity.md5 @@ -44,7 +44,7 @@ linux-stable-14.04: - cargo build --release --verbose - strip target/release/parity - md5sum target/release/parity >> parity.md5 - - aws configure set aws_access_key_id $s3_key + - aws configure set aws_access_key_id $s3_key - aws configure set aws_secret_access_key $s3_secret - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/x86_64-unknown-ubuntu_14_04-gnu/parity --body target/release/parity - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/x86_64-unknown-ubuntu_14_04-gnu/parity.md5 --body parity.md5 @@ -107,7 +107,7 @@ linux-centos: - cargo build --release --verbose - strip target/release/parity - md5sum target/release/parity >> parity.md5 - - aws configure set aws_access_key_id $s3_key + - aws configure set aws_access_key_id $s3_key - aws configure set aws_secret_access_key $s3_secret - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/x86_64-unknown-centos-gnu/parity --body target/release/parity - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/x86_64-unknown-centos-gnu/parity.md5 --body parity.md5 @@ -134,7 +134,7 @@ linux-armv7: - cargo build --target armv7-unknown-linux-gnueabihf --release --verbose - arm-linux-gnueabihf-strip target/armv7-unknown-linux-gnueabihf/release/parity - md5sum target/armv7-unknown-linux-gnueabihf/release/parity >> parity.md5 - - aws configure set aws_access_key_id $s3_key + - aws configure set aws_access_key_id $s3_key - aws configure set aws_secret_access_key $s3_secret - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/armv7-unknown-linux-gnueabihf/parity --body target/armv7-unknown-linux-gnueabihf/release/parity - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/armv7-unknown-linux-gnueabihf/parity.md5 --body parity.md5 @@ -162,7 +162,7 @@ linux-arm: - cargo build --target arm-unknown-linux-gnueabihf --release --verbose - arm-linux-gnueabihf-strip target/arm-unknown-linux-gnueabihf/release/parity - md5sum target/arm-unknown-linux-gnueabihf/release/parity >> parity.md5 - - aws configure set aws_access_key_id $s3_key + - aws configure set aws_access_key_id $s3_key - aws configure set aws_secret_access_key $s3_secret - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/arm-unknown-linux-gnueabihf/parity --body target/arm-unknown-linux-gnueabihf/release/parity - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/arm-unknown-linux-gnueabihf/parity.md5 --body parity.md5 @@ -189,8 +189,8 @@ linux-armv6: - cat .cargo/config - cargo build --target arm-unknown-linux-gnueabi --release --verbose - arm-linux-gnueabi-strip target/arm-unknown-linux-gnueabi/release/parity - - md5sum target/arm-unknown-linux-gnueabi/release/parity >> parity.md5 - - aws configure set aws_access_key_id $s3_key + - md5sum target/arm-unknown-linux-gnueabi/release/parity >> parity.md5 + - aws configure set aws_access_key_id $s3_key - aws configure set aws_secret_access_key $s3_secret - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/arm-unknown-linux-gnueabi/parity --body target/arm-unknown-linux-gnueabi/release/parity - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/arm-unknown-linux-gnueabi/parity.md5 --body parity.md5 @@ -218,7 +218,7 @@ linux-aarch64: - cargo build --target aarch64-unknown-linux-gnu --release --verbose - aarch64-linux-gnu-strip target/aarch64-unknown-linux-gnu/release/parity - md5sum target/aarch64-unknown-linux-gnu/release/parity >> parity.md5 - - aws configure set aws_access_key_id $s3_key + - aws configure set aws_access_key_id $s3_key - aws configure set aws_secret_access_key $s3_secret - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/aarch64-unknown-linux-gnu/parity --body target/aarch64-unknown-linux-gnu/release/parity - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/aarch64-unknown-linux-gnu/parity.md5 --body parity.md5 @@ -240,7 +240,7 @@ darwin: script: - cargo build --release --verbose - md5sum target/release/parity >> parity.md5 - - aws configure set aws_access_key_id $s3_key + - aws configure set aws_access_key_id $s3_key - aws configure set aws_secret_access_key $s3_secret - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/x86_64-apple-darwin/parity --body target/release/parity - aws s3api put-object --bucket builds-parity --key $CI_BUILD_REF_NAME/x86_64-apple-darwin/parity.md5 --body parity.md5 @@ -316,7 +316,6 @@ js-release: stage: build image: ethcore/javascript:latest only: - - js - master - beta - tags diff --git a/js/scripts/build.sh b/js/scripts/build.sh index 07487ffd5..1f3f44ceb 100755 --- a/js/scripts/build.sh +++ b/js/scripts/build.sh @@ -6,6 +6,7 @@ cd .. # run build (production) and store the exit code EXITCODE=0 +rm -rf .build npm run ci:build || EXITCODE=1 # back to root diff --git a/js/scripts/release.sh b/js/scripts/release.sh index bff5ea7d9..de4bdc374 100755 --- a/js/scripts/release.sh +++ b/js/scripts/release.sh @@ -1,6 +1,14 @@ #!/bin/bash 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 pushd `dirname $0` cd ../.build @@ -10,7 +18,7 @@ UTCDATE=`date -u "+%Y%m%d-%H%M%S"` # Create proper directory structure mkdir -p build -mv * build || true +mv *.* build mkdir -p src # Copy rust files @@ -22,13 +30,8 @@ cp ../src/lib.rs* ./src/ rm -rf ./.git 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 +setup_git_user git remote add origin https://${GITHUB_JS_PRECOMPILED}:@github.com/ethcore/js-precompiled.git git fetch origin git checkout -b $CI_BUILD_REF_NAME @@ -40,5 +43,16 @@ git push origin $CI_BUILD_REF_NAME # back to root 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 0