Skip to content

Commit 85fd95f

Browse files
author
3np
committed
test [publish binary]
1 parent 0b054d2 commit 85fd95f

File tree

2 files changed

+9
-26
lines changed

2 files changed

+9
-26
lines changed

.travis.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ matrix:
7777
- ./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${BUILDTYPE}" == 'debug' ] && echo "true" || echo "false")
7878
script:
7979
- true
80-
# Overrides `install` to avoid initializing clang toolchain
81-
install:
82-
- make ${BUILDTYPE}
83-
# Overrides `script` to disable publishing
84-
before_script:
85-
- npm test
8680
# Sanitizer build node v12/Debug
8781
- os: linux
8882
env: BUILDTYPE=debug TOOLSET=asan CXXFLAGS="-fext-numeric-literals"
@@ -108,12 +102,6 @@ matrix:
108102
- ./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${BUILDTYPE}" == 'debug' ] && echo "true" || echo "false")
109103
script:
110104
- true
111-
# Overrides `install` to avoid initializing clang toolchain
112-
install:
113-
- make ${BUILDTYPE}
114-
# Overrides `script` to disable publishing
115-
before_script:
116-
- npm test
117105
# Coverage build
118106
- os: linux
119107
env: BUILDTYPE=debug CXXFLAGS="--coverage" LDFLAGS="--coverage"

scripts/publish.sh

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,22 @@ function is_pr_merge() {
2828
# `publish` is used to publish binaries to s3 via commit messages if:
2929
# - the commit message includes [publish binary]
3030
# - the commit message includes [republish binary]
31-
# - the commit is not a pr_merge (checked with `is_pr_merge` function)
3231
function publish() {
3332
echo "dumping binary meta..."
3433
./node_modules/.bin/node-pre-gyp reveal --loglevel=error $@
3534

3635
echo "determining publishing status..."
3736

38-
if [[ $(is_pr_merge) ]]; then
39-
echo "Skipping publishing because this is a PR merge commit"
40-
else
41-
echo "Commit message: ${COMMIT_MESSAGE}"
37+
echo "Commit message: ${COMMIT_MESSAGE}"
4238

43-
if [[ ${COMMIT_MESSAGE} =~ "[publish binary]" ]]; then
44-
echo "Publishing"
45-
./node_modules/.bin/node-pre-gyp package publish $@
46-
elif [[ ${COMMIT_MESSAGE} =~ "[republish binary]" ]]; then
47-
echo "Re-Publishing"
48-
./node_modules/.bin/node-pre-gyp package unpublish publish $@
49-
else
50-
echo "Skipping publishing since we did not detect either [publish binary] or [republish binary] in commit message"
51-
fi
39+
if [[ ${COMMIT_MESSAGE} =~ "[publish binary]" ]]; then
40+
echo "Publishing"
41+
./node_modules/.bin/node-pre-gyp package publish $@
42+
elif [[ ${COMMIT_MESSAGE} =~ "[republish binary]" ]]; then
43+
echo "Re-Publishing"
44+
./node_modules/.bin/node-pre-gyp package unpublish publish $@
45+
else
46+
echo "Skipping publishing since we did not detect either [publish binary] or [republish binary] in commit message"
5247
fi
5348
}
5449

0 commit comments

Comments
 (0)