Make hotfix tag
This commit is contained in:
11
.travis.yml
11
.travis.yml
@@ -7,6 +7,7 @@ node_js:
|
|||||||
- node
|
- node
|
||||||
env:
|
env:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
|
- NPM_TAG=latest
|
||||||
before_install:
|
before_install:
|
||||||
- google-chrome-stable --headless --no-sandbox --remote-debugging-port=9222 &
|
- google-chrome-stable --headless --no-sandbox --remote-debugging-port=9222 &
|
||||||
install:
|
install:
|
||||||
@@ -30,13 +31,17 @@ jobs:
|
|||||||
- VPKG=$($(npm bin)/json -f package.json version)
|
- VPKG=$($(npm bin)/json -f package.json version)
|
||||||
- export VERSION=${VPKG}-prerelease.$(date +%Y%m%d%H%M%S)
|
- export VERSION=${VPKG}-prerelease.$(date +%Y%m%d%H%M%S)
|
||||||
- npm --no-git-tag-version version $VERSION
|
- npm --no-git-tag-version version $VERSION
|
||||||
|
- if [[ "$TRAVIS_BRANCH" == hotfix/* ]]; then export NPM_TAG=hotfix; fi # double brackets are important for matching the wildcard
|
||||||
- git config --global user.email "$(git log --pretty=format:'%ae' -n1)"
|
- git config --global user.email "$(git log --pretty=format:'%ae' -n1)"
|
||||||
- git config --global user.name "$(git log --pretty=format:'%an' -n1)"
|
- git config --global user.name "$(git log --pretty=format:'%an' -n1)"
|
||||||
deploy:
|
deploy:
|
||||||
provider: npm
|
provider: npm
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
"on":
|
on:
|
||||||
all_branches: true
|
branch:
|
||||||
condition: $RELEASE_BRANCHES =~ $TRAVIS_BRANCH
|
- master
|
||||||
|
- develop
|
||||||
|
- hotfix/*
|
||||||
email: $NPM_EMAIL
|
email: $NPM_EMAIL
|
||||||
api_key: $NPM_TOKEN
|
api_key: $NPM_TOKEN
|
||||||
|
tag: $NPM_TAG
|
||||||
|
|||||||
Reference in New Issue
Block a user