Skip to content

Commit c599fe0

Browse files
authored
Merge pull request #496 from NEMStudios/replaced_GRGIT_USER
Fixed github token env variable name
2 parents b94fe34 + 99ffae8 commit c599fe0

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ before_script:
1010
- npm run build
1111
script:
1212
- npm run test:cov
13-
- npm install --global typedoc
13+
- npm install --global typedoc typescript
1414
- CURRENT_VERSION=$(npm run version --silent)
1515
- typedoc --out "ts-docs/$CURRENT_VERSION" src
1616
- touch ./ts-docs/.nojekyll

travis/release.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ "$TRAVIS_BRANCH" = "$RELEASE_BRANCH" ]; then
99
git remote rm $REMOTE_NAME
1010

1111
echo "Setting remote url https://github.com/${TRAVIS_REPO_SLUG}.git"
12-
git remote add $REMOTE_NAME "https://${GRGIT_USER}@github.com/${TRAVIS_REPO_SLUG}.git" > /dev/null 2>&1
12+
git remote add $REMOTE_NAME "https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git" > /dev/null 2>&1
1313

1414
echo "Checking out $RELEASE_BRANCH as travis leaves the head detached."
1515
git checkout $RELEASE_BRANCH
@@ -25,24 +25,32 @@ if [ "$TRAVIS_BRANCH" = "$RELEASE_BRANCH" ]; then
2525
echo ""
2626

2727
echo "Creating tag v$CURRENT_VERSION"
28-
git tag "v$CURRENT_VERSION"
29-
echo ""
28+
git tag -fa "v$CURRENT_VERSION" -m "Releasing version $CURRENT_VERSION"
3029

3130
cp travis/.npmrc $HOME/.npmrc
3231

33-
echo "Releasing sdk artifacts"
34-
npm publish
35-
echo ""
32+
# The $SKIP_RELEASE_PUBLISH env variable can avoid republishing the same version to npm if something in the release process fails.
33+
if [ "$SKIP_RELEASE_PUBLISH" = "true" ]; then
34+
echo "Skipping publishing of sdk artifacts"
35+
echo ""
36+
else
37+
echo "Publishing SDK artifacts"
38+
npm publish
39+
echo ""
40+
fi
3641

3742
echo "Increasing sdk version"
38-
npm version patch -m "Increasing version to %s" --git-tag-version false
43+
npm version patch -m "Increasing version to %s" --git-tag-version false
3944

4045
CURRENT_VERSION=$(npm run version --silent)
4146

4247
echo "New Version"
4348
cat "$CURRENT_VERSION"
4449
echo ""
4550

51+
git add .
52+
git commit -m "Creating new version $CURRENT_VERSION"
53+
4654
echo "Pushing code to $REMOTE_NAME $POST_RELEASE_BRANCH"
4755
git push --set-upstream $REMOTE_NAME $RELEASE_BRANCH:$POST_RELEASE_BRANCH
4856
echo "Pushing tags to $REMOTE_NAME"

0 commit comments

Comments
 (0)