@@ -14,7 +14,14 @@ These are the steps for a regularly scheduled release from HEAD.
1414
15151 . [ Determine the next semantic version number] ( #determining-semantic-version ) .
16161 . Update CHANGELOG.md: replace the ` v0-0-0 ` and ` 0.0.0 ` with ` X.Y.0 ` .
17+ ```
18+ awk -v version=X.Y.0 'BEGIN { hv=version; gsub(/\./, "-", hv) } /END_UNRELEASED_TEMPLATE/ { found_marker = 1 } found_marker { gsub(/v0-0-0/, hv, $0); gsub(/Unreleased/, "[" version "] - " strftime("%Y-%m-%d"), $0); gsub(/0.0.0/, version, $0); } { print } ' CHANGELOG.md > /tmp/changelog && cp /tmp/changelog CHANGELOG.md
19+ ```
17201 . Replace ` VERSION_NEXT_* ` strings with ` X.Y.0 ` .
21+ ```
22+ grep -l --exclude=CONTRIBUTING.md --exclude=RELEASING.md --exclude-dir=.* VERSION_NEXT_ -r \
23+ | xargs sed -i -e 's/VERSION_NEXT_FEATURE/X.Y.0/' -e 's/VERSION_NEXT_PATCH/X.Y.0/'
24+ ```
18251 . Send these changes for review and get them merged.
19261 . Create a branch for the new release, named ` release/X.Y `
2027 ```
@@ -90,6 +97,20 @@ It will be promoted to stable next week, pending feedback.
9097It's traditional to include notable changes from the changelog, but not
9198required.
9299
100+ ### Re-releasing a version
101+
102+ Re-releasing a version (i.e. changing the commit a tag points to) is
103+ * sometimes* possible, but it depends on how far into the release process it got.
104+
105+ The two points of no return are:
106+ * If the PyPI package has been published: PyPI disallows using the same
107+ filename/version twice. Once published, it cannot be replaced.
108+ * If the BCR package has been published: Once it's been committed to the BCR
109+ registry, it cannot be replaced.
110+
111+ If release steps fail _ prior_ to those steps, then its OK to change the tag. You
112+ may need to manually delete the GitHub release.
113+
93114## Secrets
94115
95116### PyPI user rules-python
0 commit comments