ciena-blueplanet / pr-bumper

Bump the version of an npm package based on a GitHub Pull Request
MIT License
19 stars 17 forks source link

Allow non-exact Node version in travis config #136

Closed sandersky closed 6 years ago

sandersky commented 6 years ago

This project uses semver, please check the scope of this pr:

I tested the change by slightly changing the script to be:

#!/bin/bash
# source $(dirname $0)/is-bump-commit.sh
#
# if isBumpCommit
# then
#   echo "Skipping pr-bumper bump step for version bump commit"
#   exit 0
# fi

if [[ ! "${PUBLISH_NODE_VERSION:-8.1.2}" =~ ^$TRAVIS_NODE_VERSION ]]
then
  echo "Skipping pr-bumper bump step for TRAVIS_NODE_VERSION [${TRAVIS_NODE_VERSION}]"
  exit 0
fi

PACKAGE_NAME=$(node -p -e "require('./package.json').name")

if [ "$PACKAGE_NAME" == "pr-bumper" ]
then
  echo "bump it"
  # VERBOSE=1 ./bin/cli.js bump
else
  echo "bump it"
  # pr-bumper bump
fi

and running the following:

$ TRAVIS_NODE_VERSION=6 .travis/maybe-bump-version.sh 
Skipping pr-bumper bump step for TRAVIS_NODE_VERSION [6]
$ TRAVIS_NODE_VERSION=8 .travis/maybe-bump-version.sh 
bump it
$ TRAVIS_NODE_VERSION=8.1.2 .travis/maybe-bump-version.sh 
bump it
$ TRAVIS_NODE_VERSION=8.1.21 .travis/maybe-bump-version.sh 
Skipping pr-bumper bump step for TRAVIS_NODE_VERSION [8.1.21]

CHANGELOG

codecov-io commented 6 years ago

Codecov Report

Merging #136 into master will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #136   +/-   ##
=======================================
  Coverage   94.22%   94.22%           
=======================================
  Files          13       13           
  Lines         744      744           
  Branches       94       94           
=======================================
  Hits          701      701           
  Misses         43       43
job13er commented 6 years ago

Approved

Approved with PullApprove