Skip to content

Commit

Permalink
Merge pull request #786 from Nordix/peppi-lotta/fix-release-notes
Browse files Browse the repository at this point in the history
🐛 Fix release-notes in Makefile
  • Loading branch information
metal3-io-bot authored Dec 20, 2024
2 parents 0cfb17f + 7be412a commit 5fdd288
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ release-manifests: $(KUSTOMIZE) $(RELEASE_DIR) ## Builds the manifests to publis

.PHONY: release-notes-tool
release-notes-tool:
go build -C hack/tools -o $(BIN_DIR) -tags tools github.com/metal3-io/ip-address-manager/hack/tools/release
go build -C hack/tools -o $(BIN_DIR)/release -tags tools github.com/metal3-io/ip-address-manager/hack/tools/release

.PHONY: release-notes
release-notes: $(RELEASE_NOTES_DIR) $(RELEASE_NOTES) release-notes-tool
Expand Down
11 changes: 8 additions & 3 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ IPAM uses [semantic versioning](https://semver.org).

### Repository setup

Clone the repository from your intended fork:
- Clone the repository from your intended fork:
`git clone git@github.com:[your-fork]/metal3-ipam.git`

or if using existing repository, make sure origin is set to the fork and
upstream is set to `metal3-io`. Verify if your remote is set properly or not
by using following command `git remote -v`.

- Fetch the remote (`metal3-io`): `git fetch upstream`
This makes sure that all the tags are accessible.

### Creating Release Notes

- Switch to the main branch: `git checkout main`
Expand All @@ -61,9 +64,11 @@ by using following command `git remote -v`.
release, but not overwhelming the important changes contained by the
release.

- Commit and push your changes, push the new branch and create a pull request.
- Commit your changes, push the new branch and create a pull request:
IMPORTANT_NOTE:
- The commit and PR title should be 🚀 Release v1.x.y.
- The commit and PR title should be 🚀 Release v1.x.y:
-`git commit -S -s -m ":rocket: Release v1.x.x"`
-`git push -u origin release-notes-1.x.x`
- Important! The commit should only contain the release notes file, nothing
else, otherwise automation will not work.

Expand Down
6 changes: 3 additions & 3 deletions hack/tools/release/notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,16 @@ func isMinor(tag string) bool {
func run() int {
latestTag, err := latestTag()
if err != nil {
log.Fatal("Failed to get latestTag \n")
log.Fatalf("Failed to get latestTag: %v", err)
}
lastTag, err := lastTag(latestTag)
if err != nil {
log.Fatal("Failed to get lastTag \n")
log.Fatalf("Failed to get lastTag: %v", err)
}

commitHash, err := getCommitHashFromNewTag(latestTag)
if err != nil {
log.Fatalf("Failed to get commit has from latestTag %s", latestTag)
log.Fatalf("Failed to get commit hash from latestTag %s: %v", latestTag, err)
}

cmd := exec.Command("git", "rev-list", lastTag+".."+commitHash, "--merges", "--pretty=format:%B") // #nosec G204:gosec
Expand Down

0 comments on commit 5fdd288

Please sign in to comment.