File tree Expand file tree Collapse file tree 4 files changed +63
-2
lines changed Expand file tree Collapse file tree 4 files changed +63
-2
lines changed Original file line number Diff line number Diff line change @@ -12,18 +12,27 @@ script:
1212 - npm run test:cov
1313 - npm run coveralls-report
1414 - npm install --global typedoc
15- - typedoc --out ts-docs src
15+ - CURRENT_VERSION=$(npm run version --silent)
16+ - typedoc --out "ts-docs/$CURRENT_VERSION" src
1617 - touch ./ts-docs/.nojekyll
1718deploy :
1819 - provider : pages
1920 skip_cleanup : true
2021 local_dir : ts-docs
22+ keep_history : true
2123 github_token : $GITHUB_TOKEN
2224 on :
2325 branch : master
26+ node_js : " 8"
2427 - provider : script
2528 skip_cleanup : true
2629 script : /bin/sh travis/uploadArchives.sh
2730 on :
2831 branch : master
2932 node_js : " 8"
33+ - provider : script
34+ skip_cleanup : true
35+ script : /bin/sh travis/release.sh
36+ on :
37+ branch : $RELEASE_BRANCH
38+ node_js : " 8"
File renamed without changes.
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -e
3+
4+ if [ " $TRAVIS_BRANCH " = " $RELEASE_BRANCH " ]; then
5+
6+ REMOTE_NAME=" origin"
7+ POST_RELEASE_BRANCH=" post-$RELEASE_BRANCH "
8+
9+ git remote rm $REMOTE_NAME
10+
11+ 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
13+
14+ echo " Checking out $RELEASE_BRANCH as travis leaves the head detached."
15+ git checkout $RELEASE_BRANCH
16+
17+ CURRENT_VERSION=$( npm run version --silent)
18+
19+ echo " Current Version"
20+ cat " $CURRENT_VERSION "
21+ echo " "
22+
23+ echo " Testing git remote"
24+ git branch -vv
25+ echo " "
26+
27+ echo " Creating tag v$CURRENT_VERSION "
28+ git tag " v$CURRENT_VERSION "
29+ echo " "
30+
31+ cp travis/.npmrc $HOME /.npmrc
32+
33+ echo " Releasing sdk artifacts"
34+ npm publish
35+ echo " "
36+
37+ echo " Increasing sdk version"
38+ npm version patch -m " Increasing version to %s" --git-tag-version false
39+
40+ CURRENT_VERSION=$( npm run version --silent)
41+
42+ echo " New Version"
43+ cat " $CURRENT_VERSION "
44+ echo " "
45+
46+ echo " Pushing code to $REMOTE_NAME $POST_RELEASE_BRANCH "
47+ git push --set-upstream $REMOTE_NAME $RELEASE_BRANCH :$POST_RELEASE_BRANCH
48+ echo " Pushing tags to $REMOTE_NAME "
49+ git push --tags $REMOTE_NAME
50+ else
51+ echo " Release is disabled"
52+ fi
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ CURRENT_VERSION=$(npm run version --silent)
55NEW_VERSION=" $CURRENT_VERSION -alpha-$( date +%Y%m%d%H%M) "
66
77echo " Uploading npm package version $NEW_VERSION "
8- cp .npmrc.template $HOME /.npmrc
8+ cp travis/ .npmrc $HOME /.npmrc
99
1010npm version " $NEW_VERSION " --commit-hooks false --git-tag-version false
1111
You can’t perform that action at this time.
0 commit comments