Releases: alextremp/versiona
accept GITHUB_TOKEN as env variable
skipping versiona running with [skip travis] message
v4.5.0 Merge branch 'master' of https://github.com/alextremp/versiona
add VERSIONA_ENV to master command
now versiona can be called with a master command, configurable per environment:
- dev: if it's running in a beta tag
- pre: if it's running in master
- pro: if it's running in a release tag
// in master will run: VERSIONA_ENV=pre npm run deploy
// in release tag will run: VERSIONA_ENV=pro npm run deploy
versiona({
repoOrg: 'organization',
repoName: 'repoOrg',
masterCommand: 'npm run deploy'
})
It can be configured with a function which will receive the versiona env as a parameter:
// in master will run: npm run deploy:pre
// in release tag will run: npm run deploy:pro
versiona({
repoOrg: 'organization',
repoName: 'repoOrg',
masterCommand: env => `npm run deploy:${env}`
})
allow master command
- allow master command (#5)
Now versiona
can be called like:
versiona({
repoOrg: 'organization',
repoName: 'repoName',
masterCommand: 'npm run additional-command'
})
this masterCommand
will be ran:
- in semver tag releases, after the NPM publish
- in master (only this command will be ran)
FIX false changes after commit to master
Last release was not solving the problem: https://github.com/alextremp/versiona/releases/tag/v4.2.2
npm i
is creating a break line that after the versiona commit was removed, creating false package json changes every install after versiona.
This fix adds a new line break at the end of the package json file to save the same format that was read.
FIX last package.json line break
FIX
This version removes the last line break of the updated package.json in order to don't create false changes after the commit to master.
v4.2.1
v4.2.0
v4.1.0
feat add the (don't) publish option (#4)
This change:
- Adds the publish option in order to add flexibility in the publication steps, allowing to don't publish to NPM when executed.
- Versiona function returns true or false (or quits) in order to allow next steps programatically from the user's versiona.js script
v4.0.0
V4 validating the TRAVIS_TAG inside versiona (#3)
- Update Readme
- add tokens info
- update scripts to make them compliant with expected docs
- test mode should show what would happen, but not run
- TRAVIS_TAG should be analyzed internally to avoid copy-pasting the regexp
- remove complexity from travis yml
This version simplifies the versiona usage in .travis.yml
In V3:
script:
- npm run check
- |
echo TRAVIS_BRANCH=$TRAVIS_BRANCH - TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST - TRAVIS_TAG=$TRAVIS_TAG
if [[ $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-beta\.[0-9]+)?$ ]]; then
echo DEPLOY VERSION - TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH
TRAVIS_TAG=$TRAVIS_TAG GH_TOKEN=$GH_TOKEN npm run versiona
fi
In V4:
The semver regexp will be analyzed internally and will do nothing if not matched:
script:
- npm run check && TRAVIS_TAG=$TRAVIS_TAG GH_TOKEN=$GH_TOKEN npm run versiona