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 #669 from dcbrwn/master
Publish built versions to epoberezkin/ajv-dist
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
if [[ -n $TRAVIS_TAG && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then | ||
echo "About to publish $TRAVIS_TAG to ajv-dist..." | ||
|
||
git config user.email "$GIT_USER_EMAIL" | ||
git config user.name "$GIT_USER_NAME" | ||
|
||
git clone https://${GITHUB_TOKEN}@github.com/epoberezkin/ajv-dist.git ../ajv-dist | ||
|
||
mkdir -p ../ajv-dist/dist | ||
cp ./dist/* ../ajv-dist/dist | ||
cp ./bower.json ../ajv-dist | ||
cd ../ajv-dist | ||
|
||
if [[ `git status --porcelain` ]]; then | ||
echo "Changes detected. Updating master branch..." | ||
git add -A | ||
git commit -m "updated by travis build #$TRAVIS_BUILD_NUMBER" | ||
git push --quiet origin master > /dev/null 2>&1 | ||
fi | ||
|
||
echo "Publishing tag..." | ||
|
||
git tag $TRAVIS_TAG | ||
git push --tags > /dev/null 2>&1 | ||
|
||
echo "Done" | ||
fi |