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 4, 2024
1 parent 347ebff commit e76e0e3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 18 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
1 change: 0 additions & 1 deletion cmd/pluginator/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
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 e76e0e3

Please sign in to comment.