diff options
author | Mike Morris <mikemorris@users.noreply.github.com> | 2016-10-20 16:53:20 -0400 |
---|---|---|
committer | Mike Morris <mikemorris@users.noreply.github.com> | 2016-10-22 00:35:26 -0400 |
commit | eb1b385e50f783e33bb500693977f7bf45f4126e (patch) | |
tree | b3f52fc88a644d57048f1273712d834411791536 /platform | |
parent | 8633c34d014bd5390541bf74f95a5533ad971e89 (diff) | |
download | qtlocation-mapboxgl-eb1b385e50f783e33bb500693977f7bf45f4126e.tar.gz |
[node] publish Bitrise tag builds
Diffstat (limited to 'platform')
-rw-r--r-- | platform/node/bitrise.yml | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/platform/node/bitrise.yml b/platform/node/bitrise.yml index b968554781..af22fe65ea 100644 --- a/platform/node/bitrise.yml +++ b/platform/node/bitrise.yml @@ -1,9 +1,12 @@ -format_version: 1.1.0 +format_version: 1.3.0 default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git trigger_map: -- pattern: "*" - is_pull_request_allowed: true +- tag: "node-v*" + workflow: primary +- push_branch: "*" + workflow: primary +- pull_request_target_branch: "*" workflow: primary workflows: @@ -23,6 +26,16 @@ workflows: envman add --key SKIPCI --value false fi - script: + title: Check for publishing + run_if: '{{enveq "SKIPCI" "false"}}' + inputs: + - content: |- + #!/bin/bash + PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)") + if [[ "${BITRISE_GIT_TAG:-}" == "node-v${PACKAGE_JSON_VERSION}" ]]; then + envman add --key PUBLISH --value true + fi + - script: title: Run build script run_if: '{{enveq "SKIPCI" "false"}}' inputs: @@ -35,9 +48,23 @@ workflows: brew link homebrew/versions/node4-lts gem install xcpretty --no-rdoc --no-ri make node - make test-node || result=$? - ./platform/node/scripts/after_script.sh ${BITRISE_BUILD_NUMBER} ${BITRISE_GIT_TAG:-} - exit ${result:-0} + - script: + title: Run test script + run_if: '{{and (enveq "SKIPCI" "false") (enveq "PUBLISH" "")}}' + inputs: + - content: |- + #!/bin/bash + set -eu -o pipefail + make test-node || envman add --key RESULT --value $? + - script: + title: Run publish script + run_if: '{{enveq "SKIPCI" "false"}}' + inputs: + - content: |- + #!/bin/bash + set -eu -o pipefail + ./platform/node/scripts/after_script.sh ${BITRISE_BUILD_NUMBER} + exit ${RESULT:-0} - slack: title: Post to Slack run_if: '{{enveq "SKIPCI" "false"}}' |