Skip to content

Commit

Permalink
Prepare for uploading releases from inside docker
Browse files Browse the repository at this point in the history
  • Loading branch information
recrsn committed Feb 26, 2020
1 parent 1511821 commit 9758e68
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .travis.yml
Expand Up @@ -34,8 +34,22 @@ install: true

script:
- npm test
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run -w /src --entrypoint /bin/sh -v`pwd`:/src "node:${TRAVIS_NODE_VERSION}-alpine" test_alpine.sh; fi;
- ./node_modules/.bin/node-pre-gyp configure
- ./node_modules/.bin/node-pre-gyp build
- ./node_modules/.bin/node-pre-gyp package
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]
then
docker run -w /src --entrypoint /bin/sh -v`pwd`:/src "node:${TRAVIS_NODE_VERSION}-alpine" test_alpine.sh
fi
after_success:
- if [[ $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-\w)? ]]; then echo "Publishing"; npm install node-pre-gyp-github@1.4.3; ./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;
- ls
- |
if [[ $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-\w)? ]]
then
echo "Publishing"
npm install node-pre-gyp-github@1.4.3
./node_modules/.bin/node-pre-gyp-github publish --release
fi
4 changes: 4 additions & 0 deletions test_alpine.sh
Expand Up @@ -6,3 +6,7 @@ echo "Running on $(node -v)"

apk add make g++ python
npm test --unsafe-perm

./node_modules/.bin/node-pre-gyp configure
./node_modules/.bin/node-pre-gyp build
./node_modules/.bin/node-pre-gyp package

0 comments on commit 9758e68

Please sign in to comment.