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.
Merge pull request #2522 from ethcore/jg-gitlab-build
Build ethcore/js-precompiled on GitLab
- Loading branch information
Showing
28 changed files
with
69 additions
and
42 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
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,29 +1,31 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
|
||
if [[ ("$TRAVIS_PULL_REQUEST" != "false") || ("$TRAVIS_BRANCH" != "master") ]]; then | ||
exit 0 | ||
fi | ||
|
||
git config --global user.email "admin@travis-ci.org" | ||
git config --global user.name "Travis CI" | ||
git config --global push.default simple | ||
git config credential.helper "store --file=.git/credentials" | ||
echo "https://${GITHUB_TOKEN}:@github.com" > .git/credentials | ||
git checkout master | ||
|
||
DATE=`date` | ||
|
||
npm run build | ||
echo "/* ${DATE} */" >> ./index.js | ||
|
||
git add --force index.js | ||
git commit --message "[CI skip] ${DATE}" | ||
|
||
npm version patch --message "[CI skip] ${DATE} %s" | ||
git push | ||
git push --tags | ||
|
||
echo -e "$NPM_USERNAME\n$NPM_PASSWORD\n$NPM_EMAIL" | npm login | ||
npm publish | ||
# change into the js directory (one down from scripts) | ||
pushd `dirname $0` | ||
cd ../build | ||
|
||
# variables | ||
UTCDATE=`date -u "+%Y%m%d-%H%M%S"` | ||
|
||
# init git | ||
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 | ||
git remote add origin https://${GITHUB_JS_PRECOMPILED}:@github.com/ethcore/js-precompiled.git | ||
git checkout -b $CI_BUILD_REF_NAME | ||
git add . | ||
git commit -m "$UTCDATE" | ||
git push origin $CI_BUILD_REF_NAME --force | ||
|
||
# back to root | ||
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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