-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into release
- Loading branch information
Showing
7 changed files
with
118 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//registry.npmjs.org/:_authToken=${NPM_TOKEN} |
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,21 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
PUBLICATION_BRANCH=gh-pages | ||
# Checkout the branch | ||
REPO_PATH=$PWD | ||
CURRENT_VERSION=$(npm run version --silent) | ||
rm -rf $HOME/publish | ||
cd $HOME | ||
git clone --branch=$PUBLICATION_BRANCH https://${GITHUB_TOKEN}@github.com/$TRAVIS_REPO_SLUG publish 2>&1 > /dev/null | ||
cd publish | ||
# Update pages | ||
|
||
cp -r $REPO_PATH/ts-docs/. ./ | ||
# Commit and push latest version | ||
git add . | ||
git config user.name "Travis" | ||
git config user.email "travis@travis-ci.org" | ||
git commit -m "Uploading $CURRENT_VERSION docs." | ||
git push -fq origin $PUBLICATION_BRANCH 2>&1 > /dev/null | ||
cd $REPO_PATH |
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,60 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
if [ "$TRAVIS_BRANCH" = "$RELEASE_BRANCH" ]; then | ||
|
||
REMOTE_NAME="origin" | ||
POST_RELEASE_BRANCH="post-$RELEASE_BRANCH" | ||
|
||
git remote rm $REMOTE_NAME | ||
|
||
echo "Setting remote url https://github.com/${TRAVIS_REPO_SLUG}.git" | ||
git remote add $REMOTE_NAME "https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git" > /dev/null 2>&1 | ||
|
||
echo "Checking out $RELEASE_BRANCH as travis leaves the head detached." | ||
git checkout $RELEASE_BRANCH | ||
|
||
CURRENT_VERSION=$(npm run version --silent) | ||
|
||
echo "Current Version" | ||
echo "$CURRENT_VERSION" | ||
echo "" | ||
|
||
echo "Testing git remote" | ||
git branch -vv | ||
echo "" | ||
|
||
echo "Creating tag v$CURRENT_VERSION" | ||
git tag -fa "v$CURRENT_VERSION" -m "Releasing version $CURRENT_VERSION" | ||
|
||
cp travis/.npmrc $HOME/.npmrc | ||
|
||
# The $SKIP_RELEASE_PUBLISH env variable can avoid republishing the same version to npm if something in the release process fails. | ||
if [ "$SKIP_RELEASE_PUBLISH" = "true" ]; then | ||
echo "Skipping publishing of library artifacts" | ||
echo "" | ||
else | ||
echo "Publishing library artifacts" | ||
npm publish | ||
echo "" | ||
fi | ||
|
||
echo "Increasing library version" | ||
npm version patch -m "Increasing version to %s" --git-tag-version false | ||
|
||
CURRENT_VERSION=$(npm run version --silent) | ||
|
||
echo "New Version" | ||
echo "$CURRENT_VERSION" | ||
echo "" | ||
|
||
git add . | ||
git commit -m "Creating new version $CURRENT_VERSION" | ||
|
||
echo "Pushing code to $REMOTE_NAME $POST_RELEASE_BRANCH" | ||
git push --set-upstream $REMOTE_NAME $RELEASE_BRANCH:$POST_RELEASE_BRANCH | ||
echo "Pushing tags to $REMOTE_NAME" | ||
git push --tags $REMOTE_NAME | ||
else | ||
echo "Release is disabled" | ||
fi |
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,12 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
CURRENT_VERSION=$(npm run version --silent) | ||
NEW_VERSION="$CURRENT_VERSION-alpha-$(date +%Y%m%d%H%M)" | ||
|
||
echo "Uploading npm package version $NEW_VERSION" | ||
cp travis/.npmrc $HOME/.npmrc | ||
|
||
npm version "$NEW_VERSION" --commit-hooks false --git-tag-version false | ||
|
||
npm publish --tag alpha |