From 17a06aa2a6d6fec3720ed864ede727f642fad7cc Mon Sep 17 00:00:00 2001 From: Brad Sickles Date: Tue, 1 Oct 2024 14:48:27 -0400 Subject: [PATCH] Fixed version when calculating new and there are deploys for the commit --- CHANGELOG.md | 2 +- version/calc_new.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dfd8d3..db8098b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.0.122 (Sep 30, 2024) +# 0.0.122 (Oct 01, 2024) * Added `commitSha` when created deploy so that Nullstone can add commit info to deploy activity. * Added detection of automation tool (e.g. CircleCI, Github Actions, Gitlab, etc.) when creating deploy. diff --git a/version/calc_new.go b/version/calc_new.go index 52d9039..ffb0d9b 100644 --- a/version/calc_new.go +++ b/version/calc_new.go @@ -32,6 +32,7 @@ func CalcNew(ctx context.Context, pusher app.Pusher) (Info, error) { // otherwise we will append the sequence number if seq > -1 { result.Version = fmt.Sprintf("%s-%d", result.ShortCommitSha(), seq+1) + return result, nil } result.Version = result.ShortCommitSha()