Skip to content

Commit

Permalink
add versiona (#87)
Browse files Browse the repository at this point in the history
* add versiona

* add npm token

* update travis image distribution
  • Loading branch information
alextremp authored Jan 10, 2020
1 parent 6b1e8e3 commit f6716bb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ coverage
.idea
.eslintignore
.github
resources
resources
versiona.js
23 changes: 8 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
dist: trusty
language: node_js
node_js:
- "8"
cache:
directories:
- node_modules
- node_modules

before_install:
- npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN

script:
- npm run phoenix
- npm run lint
- npm test
- npm run test:integration
- npm run check:ci && npm run versiona
- npm run coverage:ci
- |
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]+$ ]]; then
echo DEPLOY TO NPM: $TRAVIS_TAG
npm publish
elif [[ $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+$ ]]; then
echo DEPLOY BETA VERSION
npm publish --tag beta
fi

after_success:
- bash <(curl -s https://codecov.io/bash)
- bash <(curl -s https://codecov.io/bash)
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"coverage:ci": "istanbul cover _mocha -- ./src/*test --recursive --compilers js:babel-register && codecov",
"performance": "babel-node src/itest/performance",
"watch": "onchange 'src/**/*.js' -- npm run build",
"lint": "sui-lint js"
"lint": "sui-lint js",
"check": "npm run lint && npm run test",
"check:ci": "npm run check && npm run test:integration",
"versiona": "node versiona.js"
},
"repository": {
"type": "git",
Expand All @@ -41,7 +44,8 @@
"jsdom": "~11.12.0",
"mocha": "~5.2.0",
"onchange": "~3.3.0",
"sinon": "~2.3.4"
"sinon": "~2.3.4",
"versiona": "^4.2.1"
},
"pre-commit": [
"lint",
Expand Down
6 changes: 6 additions & 0 deletions versiona.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const versiona = require('versiona')

versiona({
repoOrg: 'scm-spain',
repoName: 'OpenAds'
})

0 comments on commit f6716bb

Please sign in to comment.