From 3fc69e724623211cae173c4a2c443c5190fafcdd Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 17 Feb 2025 02:16:54 +0900 Subject: [PATCH] tools: Update publish.sh --- tools/publish.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/publish.sh b/tools/publish.sh index 14ef81206..20e244bac 100755 --- a/tools/publish.sh +++ b/tools/publish.sh @@ -144,8 +144,9 @@ tools+=(valgrind) for tool in "${tools[@]}"; do git checkout -b "${tool}" - sed -E "${in_place[@]}" "s/required: true/required: false/g" action.yml - sed -E "${in_place[@]}" "s/# default: #publish:tool/default: ${tool}/g" action.yml + sed -E "${in_place[@]}" action.yml \ + -e "s/required: true/required: false/g" \ + -e "s/# default: #publish:tool/default: ${tool}/g" git add action.yml git commit -m "${tool}" retry git push origin -f refs/heads/"${tool}" @@ -193,9 +194,11 @@ cp -- ./manifests/* "${schema_workspace}" # Detect changes, then commit and push if changes exist if [[ "$(git status --porcelain=v1 | wc -l)" != "0" ]]; then git commit -m 'Update manifest schema' - git push origin HEAD + retry git push origin HEAD fi ) rm -rf -- "${schema_workspace}" git worktree prune +# TODO: get branch in schema_workspace dir instead +git branch -D "${schema_branch}" "${schema_workspace##*/}"