Skip to content

Commit

Permalink
Merge pull request #483 from agathver/travis-automation
Browse files Browse the repository at this point in the history
Automate release uploading from travis
  • Loading branch information
recrsn committed Aug 19, 2018
2 parents 1f0163f + 251ad91 commit 5dfb4ee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Expand Up @@ -26,12 +26,11 @@ before_install:
- echo Building for Node $TRAVIS_NODE_VERSION
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX=$LINUX_CXX; $CXX --version; fi;
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then c++ --version; fi;
- if [[ "$TRAVIS_NODE_VERSION" == "4" || "$TRAVIS_NODE_VERSION" == "5" ]]; then npm install -g npm@5; else npm install -g npm@latest; fi;
- npm install -g npm@latest

install: true

script: npm test

after_success:
- REGEX='^v(0|[1-9]+)\.(0|[1-9]+)\.(0|[1-9]+)$'
- if [[ $TRAVIS_TAG =~ $REGEX ]] || [[ $TRAVIS_COMMIT_MESSAGE == *"publish binary"* ]]; then echo "Publishing"; npm install node-pre-gyp-github; ./node_modules/.bin/node-pre-gyp configure; ./node_modules/.bin/node-pre-gyp build; ./node_modules/.bin/node-pre-gyp package; ./node_modules/.bin/node-pre-gyp-github publish --release; fi;
- if [[ $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then echo "Publishing"; npm install node-pre-gyp-github@1.3.1; ./node_modules/.bin/node-pre-gyp configure; ./node_modules/.bin/node-pre-gyp build; ./node_modules/.bin/node-pre-gyp package; ./node_modules/.bin/node-pre-gyp-github publish --release; fi;
7 changes: 4 additions & 3 deletions appveyor.yml
Expand Up @@ -25,8 +25,7 @@ install:
- where npm
- where node
- ps: Install-Product node $env:nodejs_version $env:platform
- 'if "%nodejs_version%" LEQ 5 (npm install -g npm@5) else (npm install -g npm@latest)'
- 'if "%nodejs_version%_%platform%" == "4_x86" (npm config set -g cafile=package.json && npm config set -g strict-ssl=false)'
- 'npm install -g npm@latest'

build: off

Expand All @@ -38,5 +37,7 @@ test_script:
- npm --version
- npm test

after_test:
on_success:
- .\node_modules\.bin\node-pre-gyp package
- ps: if ($APPVEYOR_REPO_TAG_NAME -match '^v(0|[1-9]+)\.(0|[1-9]+)\.(0|[1-9]+)$') { echo "Publishing"; npm install node-pre-gyp-github@1.3.1; ./node_modules/.bin/node-pre-gyp-github publish --release }

6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -59,8 +59,8 @@
"binary": {
"module_name": "bcrypt_lib",
"module_path": "./lib/binding/",
"host": "https://github.com",
"remote_path": "/kelektiv/node.bcrypt.js/releases/download/v{version}/",
"package_name": "{module_name}-v{version}-{node_abi}-{platform}-{arch}-{libc}.tar.gz"
"package_name": "{module_name}-v{version}-{node_abi}-{platform}-{arch}-{libc}.tar.gz",
"host": "https://github.com/kelektiv/node.bcrypt.js/releases/download/",
"remote_path": "v{version}"
}
}

0 comments on commit 5dfb4ee

Please sign in to comment.