Path: blob/main/docs/developer/release/3-update-version-in-code.md
5283 views
Update Version in Code
The project must be updated to reference the upcoming release tag whenever a new release is being made.
Before you begin
Determine the VERSION.
Determine the VERSION_PREFIX
Steps
Create a branch from
mainfor grafana/agent.Update the
CHANGELOG.md:CHANGELOG.mdHeaderFirst Release Candidate or a Patch Release
Add a new header under
Main (unreleased)forVERSION (YYYY-MM-DD).
Additional RCV or SRV
Update the header
PREVIOUS_RELEASE_CANDIDATE_VERSION (YYYY-MM-DD)toVERSION (YYYY-MM-DD). The date may need updating.
Move the unreleased changes we want to add to the release branch from
Main (unreleased)toVERSION (YYYY-MM-DD).Update appropriate places in the codebase that have the previous version with the new version determined above.
Do not update the
operations/helmdirectory. It is updated independently from Agent releases.
Create a PR to merge to main (must be merged before continuing).
Create a branch from
release-VERSION_PREFIXfor grafana/agent.Cherry pick the commit on main from the merged PR in Step 3 from main into the new branch from Step 4:
Delete the
Main (unreleased)header and anything underneath it as part of the cherry-pick. Alternatively, do it after the cherry-pick is completed.Create a PR to merge to
release-VERSION_PREFIX(must be merged before continuing).