diff --git a/.npmignore b/.npmignore index 6324884..e4185d8 100644 --- a/.npmignore +++ b/.npmignore @@ -4,4 +4,5 @@ coverage .idea .eslintignore .github -resources \ No newline at end of file +resources +versiona.js \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index c31dc2a..40f96d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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) \ No newline at end of file +- bash <(curl -s https://codecov.io/bash) diff --git a/package.json b/package.json index 7f8e5c7..267c7e6 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", diff --git a/versiona.js b/versiona.js new file mode 100644 index 0000000..72c8775 --- /dev/null +++ b/versiona.js @@ -0,0 +1,6 @@ +const versiona = require('versiona') + +versiona({ + repoOrg: 'scm-spain', + repoName: 'OpenAds' +})