Skip to content

Commit 5fdd288

Browse files
Merge pull request #786 from Nordix/peppi-lotta/fix-release-notes
🐛 Fix release-notes in Makefile
2 parents 0cfb17f + 7be412a commit 5fdd288

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ release-manifests: $(KUSTOMIZE) $(RELEASE_DIR) ## Builds the manifests to publis
305305

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

310310
.PHONY: release-notes
311311
release-notes: $(RELEASE_NOTES_DIR) $(RELEASE_NOTES) release-notes-tool

docs/releasing.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,16 @@ IPAM uses [semantic versioning](https://semver.org).
3232

3333
### Repository setup
3434

35-
Clone the repository from your intended fork:
35+
- Clone the repository from your intended fork:
3636
`git clone [email protected]:[your-fork]/metal3-ipam.git`
3737

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

42+
- Fetch the remote (`metal3-io`): `git fetch upstream`
43+
This makes sure that all the tags are accessible.
44+
4245
### Creating Release Notes
4346

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

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

hack/tools/release/notes.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,16 @@ func isMinor(tag string) bool {
125125
func run() int {
126126
latestTag, err := latestTag()
127127
if err != nil {
128-
log.Fatal("Failed to get latestTag \n")
128+
log.Fatalf("Failed to get latestTag: %v", err)
129129
}
130130
lastTag, err := lastTag(latestTag)
131131
if err != nil {
132-
log.Fatal("Failed to get lastTag \n")
132+
log.Fatalf("Failed to get lastTag: %v", err)
133133
}
134134

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

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

0 commit comments

Comments
 (0)