Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Set previous release tag version for RELEASE CANDIDATE/BETA RELEASE #10435

Merged
merged 5 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -997,11 +997,6 @@ serve-book: ## Build and serve the book (with live-reload)

## latest git tag for the commit, e.g., v0.3.10
RELEASE_TAG ?= $(shell git describe --abbrev=0 2>/dev/null)
ifneq (,$(findstring -,$(RELEASE_TAG)))
PRE_RELEASE=true
endif
# the previous release tag, e.g., v0.3.9, excluding pre-release tags
PREVIOUS_TAG ?= $(shell git tag -l | grep -E "^v[0-9]+\.[0-9]+\.[0-9]+$$" | sort -V | grep -B1 $(RELEASE_TAG) | head -n 1 2>/dev/null)
chandankumar4 marked this conversation as resolved.
Show resolved Hide resolved
## set by Prow, ref name of the base branch, e.g., main
RELEASE_ALIAS_TAG := $(PULL_BASE_REF)
RELEASE_DIR := out
Expand Down Expand Up @@ -1166,7 +1161,7 @@ release-notes-tool:

.PHONY: release-notes
release-notes: release-notes-tool
sbueringer marked this conversation as resolved.
Show resolved Hide resolved
./bin/notes --release $(RELEASE_TAG) > CHANGELOG/$(RELEASE_TAG).md
./bin/notes --release $(RELEASE_TAG) --previous-release-version "$(PREVIOUS_VERSION_TAG)" > CHANGELOG/$(RELEASE_TAG).md
sbueringer marked this conversation as resolved.
Show resolved Hide resolved

chandankumar4 marked this conversation as resolved.
Show resolved Hide resolved
.PHONY: test-release-notes-tool
test-release-notes-tool:
Expand Down
19 changes: 13 additions & 6 deletions docs/release/release-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,15 +360,22 @@ The goal of this task is to keep the CAPI community updated on recent PRs that h

#### Create PR for release notes
1. Checkout the `main` branch.
1. Generate release notes with:
2. Generate release notes with:

1. RELEASE CANDIDATE/BETA RELEASE example:
```bash
# RELEASE_TAG should be the new desired tag (note: at this point the tag does not yet exist).
# Can be also used for pre-releases. The warning banner for RC and beta releases will be determined automatically.
RELEASE_TAG=v1.6.x make release-notes
# PREVIOUS_VERSION_TAG is the previous released tag for determining the changes.
chandankumar4 marked this conversation as resolved.
Show resolved Hide resolved
RELEASE_TAG=v1.7.x-rc.1 PREVIOUS_VERSION_TAG=tags/v1.7.x-rc.0 make release-notes
```
**Note**: For a first pre-release version without a pre-release precedent, use above command without `PREVIOUS_VERSION_TAG`.
2. STABLE RELEASE example
```bash
# RELEASE_TAG should be the new desired tag (note: at this point the tag does not yet exist).
RELEASE_TAG=v1.7.x make release-notes
```

1. This will generate a new release notes file at `CHANGELOG/<RELEASE_TAG>.md`. Finalize the release notes:
3. This will generate a new release notes file at `CHANGELOG/<RELEASE_TAG>.md`. Finalize the release notes:
- [ ] Look for any `MISSING_AREA` entries. Add the corresponding label to the PR and regenerate the notes.
- [ ] Look for any `MULTIPLE_AREAS` entries. If the PR does indeed guarantee multiple areas, just remove the `MULTIPLE_AREAS` prefix and just leave the areas. Otherwise, fix the labels in the PR and regenerate the notes.
- [ ] Review that all areas are correctly assigned to each PR. If not, correct the labels and regenerate the notes.
Expand All @@ -381,8 +388,8 @@ The goal of this task is to keep the CAPI community updated on recent PRs that h
- [ ] Sort manually all entries if you made any manual edits that might have altered the correct order.
- [ ] **For minor releases:** Modify `Changes since v1.x.y` to `Changes since v1.x`
<br>**Note**: The release notes tool includes all merges since the previous release branch was branched of.
1. Checkout `main`, branch out from it and add `CHANGELOG/<RELEASE_TAG>.md`.
1. Open a pull request **against the main branch** with all manual edits to `CHANGELOG/<RELEASE_TAG>.md` which is used for the new release notes. The commit and PR title should be `🚀 Release v1.x.y`.
4. Checkout `main`, branch out from it and add `CHANGELOG/<RELEASE_TAG>.md`.
5. Open a pull request **against the main branch** with all manual edits to `CHANGELOG/<RELEASE_TAG>.md` which is used for the new release notes. The commit and PR title should be `🚀 Release v1.x.y`.
<br>**Note**: Important! The commit should only contain the release notes file, nothing else, otherwise automation will not work.


Expand Down
6 changes: 0 additions & 6 deletions hack/tools/release/notes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,6 @@ func validateConfig(config *notesCmdConfig, releaseType string) error {
}
}

if releaseType != "" {
chandankumar4 marked this conversation as resolved.
Show resolved Hide resolved
if config.previousReleaseVersion == "" {
return errors.New("--previous-release-version need to be set with RELEASE CANDIDATE/BETA RELEASE tag")
}
}

return nil
}

Expand Down