Make GitLab js-precompiled really update Cargo.toml in main repo (#2869)
* Src outputs into build.sh * reset detatched head * add .dist * testing for this branch * update comments, be explicit is what we are doing * [ci skip] js-precompiled 20161025-173946 * Revert "[ci skip] js-precompiled 20161025-173946" This reverts commit 0d23f7683c6e18e4642566313963c130684afa90. * remove testing branch * typo
This commit is contained in:
parent
014e47a50a
commit
d1d82e787b
1
js/.gitignore
vendored
1
js/.gitignore
vendored
@ -3,4 +3,5 @@ npm-debug.log
|
||||
build
|
||||
.build
|
||||
.coverage
|
||||
.dist
|
||||
.happypack
|
||||
|
@ -6,8 +6,15 @@ cd ..
|
||||
|
||||
# run build (production) and store the exit code
|
||||
EXITCODE=0
|
||||
rm -rf .build
|
||||
npm run ci:build || EXITCODE=1
|
||||
BUILDDIR=./.dist
|
||||
rm -rf $BUILDDIR
|
||||
mkdir -p $BUILDDIR/src
|
||||
BUILD_DEST=$BUILDDIR/build npm run ci:build || EXITCODE=1
|
||||
|
||||
# Copy rust files
|
||||
cp Cargo.precompiled.toml $BUILDDIR/Cargo.toml
|
||||
cp build.rs $BUILDDIR
|
||||
cp src/lib.rs* $BUILDDIR/src
|
||||
|
||||
# back to root
|
||||
popd
|
||||
|
@ -13,21 +13,11 @@ function setup_git_user {
|
||||
BASEDIR=`dirname $0`
|
||||
GITLOG=./.git/gitcommand.log
|
||||
pushd $BASEDIR
|
||||
cd ../.build
|
||||
cd ../.dist
|
||||
|
||||
# variables
|
||||
UTCDATE=`date -u "+%Y%m%d-%H%M%S"`
|
||||
|
||||
# Create proper directory structure
|
||||
mkdir -p build
|
||||
mv *.* build
|
||||
mkdir -p src
|
||||
|
||||
# Copy rust files
|
||||
cp ../Cargo.precompiled.toml Cargo.toml
|
||||
cp ../build.rs .
|
||||
cp ../src/lib.rs* ./src/
|
||||
|
||||
# init git
|
||||
rm -rf ./.git
|
||||
git init
|
||||
@ -40,21 +30,23 @@ git checkout -b $CI_BUILD_REF_NAME
|
||||
git add .
|
||||
git commit -m "$UTCDATE [compiled]"
|
||||
git merge origin/$CI_BUILD_REF_NAME -X ours --commit -m "$UTCDATE [release]"
|
||||
git push origin $CI_BUILD_REF_NAME 2>$GITLOG
|
||||
git push origin HEAD:refs/heads/$CI_BUILD_REF_NAME 2>$GITLOG
|
||||
|
||||
# back to root
|
||||
popd
|
||||
|
||||
# bump js-precompiled
|
||||
cargo update -p parity-ui-precompiled
|
||||
|
||||
# add to git and push
|
||||
# inti git with right origin
|
||||
setup_git_user
|
||||
git remote set-url origin https://${GITHUB_JS_PRECOMPILED}:@github.com/ethcore/parity.git
|
||||
git fetch origin 2>$GITLOG
|
||||
|
||||
# at this point we have a detached head on GitLab, reset
|
||||
git reset --hard origin/$CI_BUILD_REF_NAME 2>$GITLOG
|
||||
|
||||
# bump js-precompiled, add, commit & push
|
||||
cargo update -p parity-ui-precompiled
|
||||
git add . || true
|
||||
git commit -m "[ci skip] js-precompiled $UTCDATE" || true
|
||||
git push origin $CI_BUILD_REF_NAME 2>$GITLOG || true
|
||||
git commit -m "[ci skip] js-precompiled $UTCDATE"
|
||||
git push origin HEAD:refs/heads/$CI_BUILD_REF_NAME 2>$GITLOG
|
||||
|
||||
# exit with exit code
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user