diff --git a/internal/version/version.go b/internal/version/version.go index 873b6033..db323dfc 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -3,7 +3,7 @@ package version // DDLambdaVersion is the current version number of this library (datadog-lambda-go). // It is automatically updated by the release script. -const DDLambdaVersion = "v1.27.0" +const DDLambdaVersion = "1.27.0" // DDTraceVersion is the version of dd-trace-go required by this libary. // This should match the version number specified in go.mod. diff --git a/scripts/release.sh b/scripts/release.sh index 58b5f71f..c6bae70c 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -25,11 +25,16 @@ fi if [ -z "$1" ]; then echo "Must specify a desired version number" exit 1 -elif [[ ! $1 =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then - echo "Must use a semantic version, e.g., 3.1.4" - exit 1 else - NEW_VERSION=$1 + # Remove 'v' prefix if present + CLEAN_VERSION=${1#v} + + if [[ ! $CLEAN_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Must use a semantic version, e.g., 3.1.4" + exit 1 + else + NEW_VERSION=$CLEAN_VERSION + fi fi CURRENT_DD_TRACE_VERSION="$(grep "const DDTraceVersion" internal/version/version.go | grep -o -E "[0-9]+\.[0-9]+\.[0-9]+")"