From 48ae300e120248496604ee989777578481e0f377 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 30 Dec 2025 17:52:36 +0900 Subject: [PATCH] tools: Update publish.sh --- tools/publish.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/publish.sh b/tools/publish.sh index 2680b861..2b6b7db0 100755 --- a/tools/publish.sh +++ b/tools/publish.sh @@ -121,12 +121,9 @@ retry git push origin refs/heads/main retry git push origin refs/tags/"${tag}" major_version_tag="v${version%%.*}" -git checkout -b "${major_version_tag}" -retry git push origin refs/heads/"${major_version_tag}" +git branch "${major_version_tag}" git tag -f "${major_version_tag}" -retry git push origin -f refs/tags/"${major_version_tag}" -git checkout main -git branch -d "${major_version_tag}" +refs=("refs/heads/${major_version_tag}" "+refs/tags/${major_version_tag}") tools=() for tool in tools/codegen/base/*.json; do @@ -145,7 +142,6 @@ tools+=( # Non-manifest-based tools. tools+=(valgrind) -refs=() for tool in "${tools[@]}"; do git checkout -b "${tool}" sed -E "${in_place[@]}" action.yml \ @@ -155,9 +151,10 @@ for tool in "${tools[@]}"; do git commit -m "${tool}" git tag -f "${tool}" git checkout main - refs+=(refs/heads/"${tool}" refs/tags/"${tool}") + refs+=("+refs/heads/${tool}" "+refs/tags/${tool}") done -retry git push origin --atomic -f "${refs[@]}" +retry git push origin --atomic "${refs[@]}" +git branch -d "${major_version_tag}" git branch -D "${tools[@]}" schema_workspace=/tmp/workspace