diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index ed647d96..c8b8ea88 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,5 +1,12 @@ name: Main workflow -on: [push] + +on: + pull_request: + push: + branches: + - master + - releases/* + jobs: build: name: Build diff --git a/__tests__/verify-node-version.sh b/__tests__/verify-node-version.sh index 15a5ae12..03823666 100755 --- a/__tests__/verify-node-version.sh +++ b/__tests__/verify-node-version.sh @@ -1,15 +1,13 @@ #!/bin/sh -if [[ -z "$1" ]]; then +if [ -z "$1" ]; then echo "Must supply version argument" exit 1 fi node_version="$(node --version)" echo "Found node version '$node_version'" -if [[ $node_version =~ "v$1" ]]; then - echo "Success. Version matches 'v$1'" -else +if [ -z "$(echo $node_version | grep v$1)" ]; then echo "Unexpected version" exit 1 fi \ No newline at end of file