mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-22 03:14:10 +01:00
Always use system date for changelogs
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
2fe211c978
commit
1334631382
|
|
@ -79,8 +79,9 @@ release.
|
|||
3. Commit the changes.
|
||||
4. Generate the changelog.
|
||||
1. Activate your python virtual environment.
|
||||
2. Run `./scripts/generate-changelog.sh v1.2 2021-10-01` (using the correct
|
||||
version number and the `YYYY-MM-DD` format for the release date).
|
||||
2. Run `./scripts/generate-changelog.sh v1.2` (using the correct version number).
|
||||
The script while use the current date. If that date is wrong, correct it by using
|
||||
the same `YYYY-MM-DD` date format.
|
||||
3. Commit the result.
|
||||
5. Tag the branch with the spec release with a format of `v1.2` (if releasing Matrix 1.2).
|
||||
6. Push the release branch and the tag.
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
# /bin/bash
|
||||
|
||||
# Usage: ./scripts/generate-changelog.sh v1.2 2021-04-01
|
||||
# or: ./scripts/generate-changelog.sh vUNSTABLE
|
||||
# Usage: ./scripts/generate-changelog.sh v1.2 for changelogs of stable releases
|
||||
# or: ./scripts/generate-changelog.sh vUNSTABLE for the unstable changelog.
|
||||
|
||||
set -e
|
||||
|
||||
VERSION="$1"
|
||||
DATE="$2"
|
||||
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "ERROR: The version of the changelog must be provided"
|
||||
|
|
@ -17,21 +16,10 @@ if [ "$VERSION" = "vUNSTABLE" ]; then
|
|||
TITLE="Changes since last release"
|
||||
LINKTITLE="Unstable"
|
||||
FILENAME="unstable.md"
|
||||
DATE=$(date -Iseconds)
|
||||
else
|
||||
TITLE="$VERSION Changelog"
|
||||
LINKTITLE="$VERSION"
|
||||
FILENAME="$VERSION.md"
|
||||
|
||||
if [ -z "$DATE" ]; then
|
||||
echo "ERROR: The date of the release must be provided for stable releases"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! "$DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
|
||||
echo "ERROR: The date does not have the format YYYY-MM-DD"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
cd `dirname $0`/../changelogs
|
||||
|
|
@ -55,7 +43,7 @@ layout: changelog
|
|||
outputs:
|
||||
- html
|
||||
- checklist
|
||||
date: $DATE
|
||||
date: $(date -Idate)
|
||||
---
|
||||
EOF
|
||||
# Remove trailing whitespace (such as our intentionally blank RST headings)
|
||||
|
|
|
|||
Loading…
Reference in a new issue