release.sh: origin remote + single-tag push
auto-detect gitea-local vs origin (RELEASE_REMOTE override); push only the release tag instead of --tags, which choked on divergent legacy tags.
This commit is contained in:
parent
ff2f30f47a
commit
a700edccc6
1 changed files with 7 additions and 3 deletions
|
|
@ -14,7 +14,9 @@
|
|||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
REMOTE="gitea-local"
|
||||
# The LAN-Gitea remote is named "origin" on current checkouts, "gitea-local"
|
||||
# on older ones. Take whichever exists; override with RELEASE_REMOTE=<name>.
|
||||
REMOTE="${RELEASE_REMOTE:-$(git -C "$ROOT" remote | grep -qx gitea-local && echo gitea-local || echo origin)}"
|
||||
|
||||
bold() { printf '\033[1m%s\033[0m\n' "$*"; }
|
||||
ok() { printf ' \033[32m✓\033[0m %s\n' "$*"; }
|
||||
|
|
@ -224,12 +226,14 @@ bold "[5/6] Tag and push"
|
|||
|
||||
echo " About to run:"
|
||||
echo " git tag v$NEW_VERSION"
|
||||
echo " git push $REMOTE public --tags"
|
||||
echo " git push $REMOTE public v$NEW_VERSION"
|
||||
echo " The tag push triggers the release workflow: gate → build → verify → publish."
|
||||
ask "Proceed?" || abort
|
||||
|
||||
git -C "$ROOT" tag "v$NEW_VERSION"
|
||||
git -C "$ROOT" push "$REMOTE" public --tags
|
||||
# Push only this release's tag. --tags would ship every local tag and chokes
|
||||
# on this checkout's divergent legacy tags (v0.2.8.2 had to be cut by hand).
|
||||
git -C "$ROOT" push "$REMOTE" public "v$NEW_VERSION"
|
||||
ok "pushed public + v$NEW_VERSION to $REMOTE"
|
||||
|
||||
# ------------------------------------------------------------- step 6: watch CI
|
||||
|
|
|
|||
Loading…
Reference in a new issue