diff --git a/.github/workflows/release-api.yml b/.github/workflows/release-api.yml index 180c8d351b..82c72fca08 100644 --- a/.github/workflows/release-api.yml +++ b/.github/workflows/release-api.yml @@ -120,10 +120,7 @@ jobs: # Create release draft changelog_file=$(mktemp) - currentBranch=$(git describe --tags) - module=$(echo "${currentBranch}" | cut -d'-' -f1) - version=${currentBranch##*-} - currentTag="${module}/${version}" + currentTag=$(git describe --tags) ./releasing/compile-changelog.sh "api" "${currentTag}" "${changelog_file}" # Create github releases diff --git a/.github/workflows/release-cmd-config.yml b/.github/workflows/release-cmd-config.yml index 83be354ae2..c758edb7ff 100644 --- a/.github/workflows/release-cmd-config.yml +++ b/.github/workflows/release-cmd-config.yml @@ -124,10 +124,7 @@ jobs: # Create release draft changelog_file=$(mktemp) - currentBranch=$(git describe --tags) - module=$(echo "${currentBranch}" | cut -d'-' -f1) - version=${currentBranch##*-} - currentTag="${module}/${version}" + currentTag=$(git describe --tags) ./releasing/compile-changelog.sh "cmd/config" "${currentTag}" "${changelog_file}" # Create github releases diff --git a/.github/workflows/release-kyaml.yml b/.github/workflows/release-kyaml.yml index 4a3a8ab8c8..e2650546ad 100644 --- a/.github/workflows/release-kyaml.yml +++ b/.github/workflows/release-kyaml.yml @@ -97,10 +97,7 @@ jobs: # Create release draft changelog_file=$(mktemp) - currentBranch=$(git describe --tags) - module=$(echo "${currentBranch}" | cut -d'-' -f1) - version=${currentBranch##*-} - currentTag="${module}/${version}" + currentTag=$(git describe --tags) ./releasing/compile-changelog.sh "kyaml" "${currentTag}" "${changelog_file}" # Create github releases diff --git a/cmd/gorepomod/internal/git/runner.go b/cmd/gorepomod/internal/git/runner.go index 34ca8c8911..8db6759cbf 100644 --- a/cmd/gorepomod/internal/git/runner.go +++ b/cmd/gorepomod/internal/git/runner.go @@ -391,7 +391,7 @@ func (gr *Runner) GetMainBranch() string { } func (gr *Runner) GetCurrentVersionFromHead() string { - currentBranchName, err := gr.run(noHarmDone, "rev-parse", "--abbrev-ref", "release-kyaml-v0.16.3") + currentBranchName, err := gr.run(noHarmDone, "rev-parse", "--abbrev-ref", "HEAD") if err != nil { _ = fmt.Errorf("error getting current version") } diff --git a/cmd/pluginator/go.sum b/cmd/pluginator/go.sum index 0f48a86b3f..928b83b4c7 100644 --- a/cmd/pluginator/go.sum +++ b/cmd/pluginator/go.sum @@ -26,7 +26,6 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= diff --git a/releasing/build-kustomize-library.sh b/releasing/build-kustomize-library.sh index ab9eebf253..16486f552b 100755 --- a/releasing/build-kustomize-library.sh +++ b/releasing/build-kustomize-library.sh @@ -52,10 +52,8 @@ function build_kustomize_binary { main() { - currentBranch=$(git describe --tags) - module=$(echo "${currentBranch}" | cut -d'-' -f1) - version=${currentBranch##*-} - currentTag="${module}/${version}" + currentTag=$(git describe --tags) + version=${currentTag##*/} if grep -q -E '^[0-9]+(\.[0-9]+)*$' <<< "$version" then