Skip to content

Commit 049e3a3

Browse files
committed
chore: Automate setting of X.Y.Z to new version number in release
1 parent 55c2e6f commit 049e3a3

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

contributing/Documentation/Version numbers in documentation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ This placeholder is used when you need to tag a sub-part of something, for examp
2323

2424
> [!Tip]
2525
> We have Templater templates for both these blocks. Use the `<%` icon in the Ribbon choose a template and insert it where the cursor is.
26+
27+
The [release.sh](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/release.sh) script automatically updates all `X.Y.Z` to the new version number during the release.

contributing/Releases/How do I make a release.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
- Backwards incompatible change: increase major version
99
- New functionality: increase minor version
1010
- Only bug fixes: increase patch version
11-
1. Having decided on the new version, replace all `X.Y.Z` in the documentation with the new version number.
1211
1. Check the current version of the obsidian dependency in [package.json](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/package.json) (for example, `0.13.21`)
1312
1. Run `./release.sh <new tasks version> <obsidian version>`
1413
- Make sure there are no uncommitted changes. Stash them if necessary.

release.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ read -p "Continue? [y/N] " -n 1 -r
3030
echo
3131
if [[ $REPLY =~ ^[Yy]$ ]]
3232
then
33+
echo "Updating X.Y.Z version numbers in docs"
34+
find ./docs/ -name _meta -prune -o -type f -name '*.md' -exec sed -i '' s/X\.Y\.Z/${NEW_VERSION}/g {} +
35+
3336
echo "Updating package.json"
3437
TEMP_FILE=$(mktemp)
3538
jq ".version |= \"${NEW_VERSION}\"" package.json > "$TEMP_FILE" || exit 1

0 commit comments

Comments
 (0)