diff --git a/package-lock.json b/package-lock.json index 77046ae..7120e52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@digicatapult/wasp-reading-service", - "version": "0.1.43", + "version": "0.1.44", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@digicatapult/wasp-reading-service", - "version": "0.1.43", + "version": "0.1.44", "license": "Apache-2.0", "dependencies": { "body-parser": "^1.20.2", diff --git a/package.json b/package.json index 6ca95ea..17ddded 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@digicatapult/wasp-reading-service", - "version": "0.1.43", + "version": "0.1.44", "description": "Service for WASP", "main": "app/index.js", "type": "module", diff --git a/scripts/check-version.sh b/scripts/check-version.sh index 919a600..9b0e167 100755 --- a/scripts/check-version.sh +++ b/scripts/check-version.sh @@ -4,8 +4,8 @@ set -e function check_versions_consistent () { - local PACKAGE_VERSION=$(yq eval '.version' ./package.json) - local PACKAGE_LOCK_VERSION=$(yq eval '.version' ./package-lock.json) + local PACKAGE_VERSION=$(yq eval -o y '.version' ./package.json) + local PACKAGE_LOCK_VERSION=$(yq eval -o y '.version' ./package-lock.json) if [ "$PACKAGE_VERSION" != "$PACKAGE_LOCK_VERSION" ]; then echo "Inconsistent versions detected" @@ -40,7 +40,7 @@ function check_version_greater () { # Get published git tags that match semver regex with a "v" prefix then remove the "v" character PUBLISHED_VERSIONS=$(git tag | grep "^v[0-9]\+\.[0-9]\+\.[0-9]\+\(\-[a-zA-Z-]\+\(\.[0-9]\+\)*\)\{0,1\}$" | sed 's/^v\(.*\)$/\1/') # Get the current version from package.json -CURRENT_VERSION=$(yq eval '.version' ./package.json) +CURRENT_VERSION=$(yq eval -o y '.version' ./package.json) if check_version_greater "$CURRENT_VERSION" "$PUBLISHED_VERSIONS"; then echo "VERSION=v$CURRENT_VERSION" >> $GITHUB_OUTPUT