Skip to content

Commit

Permalink
fix build-kustomize-library
Browse files Browse the repository at this point in the history
  • Loading branch information
antoooks committed Feb 12, 2024
1 parent 28e0f9e commit 04ebcba
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/release-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/release-cmd-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/release-kyaml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/gorepomod/internal/git/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
6 changes: 2 additions & 4 deletions releasing/build-kustomize-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04ebcba

Please sign in to comment.