docs: clarify makerelease dry-run branch requirement
This commit is contained in:
@@ -44,7 +44,7 @@ sudo ./fullupgrade
|
|||||||
|
|
||||||
`makerelease.sh` automates a Git release workflow:
|
`makerelease.sh` automates a Git release workflow:
|
||||||
|
|
||||||
1. checks that the current branch is `dev`
|
1. checks that the current branch is `dev` for real releases
|
||||||
2. verifies the working tree is clean
|
2. verifies the working tree is clean
|
||||||
3. optionally computes a new version from an increment shortcut
|
3. optionally computes a new version from an increment shortcut
|
||||||
4. switches to `main`
|
4. switches to `main`
|
||||||
@@ -80,6 +80,7 @@ sudo ./fullupgrade
|
|||||||
- Make sure the `dev` branch contains the changes you want to release.
|
- Make sure the `dev` branch contains the changes you want to release.
|
||||||
- `VERSION` is used directly as the tag name.
|
- `VERSION` is used directly as the tag name.
|
||||||
- If `VERSION` starts with `+`, it is treated as an increment based on the latest existing tag.
|
- If `VERSION` starts with `+`, it is treated as an increment based on the latest existing tag.
|
||||||
|
- `--dry-run` can be used from any branch and only prints the computed tag.
|
||||||
- The script may fail if Git state is unexpected or if a tag already exists.
|
- The script may fail if Git state is unexpected or if a tag already exists.
|
||||||
- The tag message is automatically generated as `Release <version>`.
|
- The tag message is automatically generated as `Release <version>`.
|
||||||
|
|
||||||
@@ -87,7 +88,7 @@ sudo ./fullupgrade
|
|||||||
|
|
||||||
This repository is intentionally minimal.
|
This repository is intentionally minimal.
|
||||||
- `fullupgrade` is hardened with `set -euo pipefail`.
|
- `fullupgrade` is hardened with `set -euo pipefail`.
|
||||||
- `makerelease.sh` now includes clean-tree checks, duplicate tag protection, increment shortcuts, dry-run support, and a trap to return to the original branch on exit.
|
- `makerelease.sh` now includes clean-tree checks, duplicate tag protection, increment shortcuts, dry-run support from any branch, and a trap to return to the original branch on exit.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -33,7 +33,7 @@ Use --dry-run to show the computed release version without running Git actions.
|
|||||||
|
|
||||||
Requirements:
|
Requirements:
|
||||||
- run from a clean Git working tree
|
- run from a clean Git working tree
|
||||||
- current branch must be dev
|
- current branch must be dev for real releases
|
||||||
- main branch must exist locally
|
- main branch must exist locally
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,7 @@ fi
|
|||||||
CURRENTBRANCH=$(git rev-parse --abbrev-ref HEAD)
|
CURRENTBRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||||
ORIGBRANCH="${CURRENTBRANCH}"
|
ORIGBRANCH="${CURRENTBRANCH}"
|
||||||
|
|
||||||
if [ "${CURRENTBRANCH}" != "dev" ]; then
|
if [ "${is_dry_run}" = false ] && [ "${CURRENTBRANCH}" != "dev" ]; then
|
||||||
echo "You are not in dev branch!"
|
echo "You are not in dev branch!"
|
||||||
echo "Use dev branch to make a release!"
|
echo "Use dev branch to make a release!"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user