This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Combine cargo updates into one * Update log tag
- Loading branch information
Showing
7 changed files
with
116 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
// test script 10 | ||
// test script 11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# variables | ||
UTCDATE=`date -u "+%Y%m%d-%H%M%S"` | ||
BRANCH=$CI_BUILD_REF_NAME | ||
GIT_PARITY="https://${GITHUB_JS_PRECOMPILED}:@github.com/paritytech/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` | ||
pushd $BASEDIR | ||
|
||
echo "*** [cargo] Setting up GitHub config for parity" | ||
setup_git_user | ||
git remote set-url origin $GIT_PARITY | ||
git reset --hard origin/$BRANCH 2>$GITLOG | ||
git submodule update | ||
|
||
if [ "$BRANCH" == "master" ]; then | ||
cd js | ||
|
||
echo "*** [cargo] Bumping package.json patch version" | ||
npm --no-git-tag-version version | ||
npm version patch | ||
|
||
cd .. | ||
|
||
git add js | ||
fi | ||
|
||
echo "*** [cargo] Updating cargo parity-ui-precompiled" | ||
sed -i "/^parity-ui-precompiled/ { s/branch = \".*\"/branch = \"$BRANCH\"/g; }" dapps/ui/Cargo.toml | ||
cargo update -p parity-ui-precompiled | ||
cargo update -p parity-ui-old-precompiled | ||
|
||
echo "*** [cargo] Committing updated files" | ||
git add dapps/ui/Cargo.toml | ||
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 "*** [cargo] Release completed" | ||
popd | ||
|
||
# exit with exit code | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# variables | ||
UTCDATE=`date -u "+%Y%m%d-%H%M%S"` | ||
BRANCH=$CI_BUILD_REF_NAME | ||
GIT_JS_PRECOMPILED="https://${GITHUB_JS_PRECOMPILED}:@github.com/paritytech/js-precompiled.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 "*** [v2 precompiled] Setting up GitHub config" | ||
rm -rf ./.git | ||
git init | ||
setup_git_user | ||
|
||
echo "*** [v2 precompiled] Checking out $BRANCH branch" | ||
git remote add origin $GIT_JS_PRECOMPILED | ||
git fetch origin 2>$GITLOG | ||
git checkout -b $BRANCH | ||
|
||
echo "*** [v2 precompiled] Committing compiled files for $UTCDATE" | ||
mv build ../build.new | ||
git add . | ||
git commit -m "$UTCDATE [update]" | ||
git merge origin/$BRANCH -X ours --commit -m "$UTCDATE [merge]" | ||
git rm -r build | ||
rm -rf build | ||
git commit -m "$UTCDATE [cleanup]" | ||
mv ../build.new build | ||
git add . | ||
git commit -m "$UTCDATE [release]" | ||
|
||
echo "*** [v2 precompiled] Merging remote" | ||
git push origin HEAD:refs/heads/$BRANCH 2>$GITLOG | ||
|
||
popd | ||
|
||
# exit with exit code | ||
exit 0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
// test script 15 | ||
// test script 16 |