diff --git a/tools/publish.sh b/tools/publish.sh index 20e244ba..ac2e140d 100755 --- a/tools/publish.sh +++ b/tools/publish.sh @@ -117,18 +117,14 @@ fi set -x git tag "${tag}" -retry git push origin main -retry git push origin --tags +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}" -if git --no-pager tag | grep -Eq "^${major_version_tag}$"; then - git tag -d "${major_version_tag}" - retry git push --delete origin refs/tags/"${major_version_tag}" -fi -git tag "${major_version_tag}" -retry git push origin --tags +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}" @@ -150,12 +146,8 @@ for tool in "${tools[@]}"; do git add action.yml git commit -m "${tool}" retry git push origin -f refs/heads/"${tool}" - if git --no-pager tag | grep -Eq "^${tool}$"; then - git tag -d "${tool}" - retry git push --delete origin refs/tags/"${tool}" - fi - git tag "${tool}" - retry git push origin --tags + git tag -f "${tool}" + retry git push origin -f refs/tags/"${tool}" git checkout main git branch -D "${tool}" done diff --git a/tools/tidy.sh b/tools/tidy.sh index a2148c2c..7df5b4ec 100755 --- a/tools/tidy.sh +++ b/tools/tidy.sh @@ -666,7 +666,7 @@ elif check_install shellcheck; then if [[ ${#docker_files[@]} -gt 0 ]]; then # Exclude SC2096 due to the way the temporary script is created. shellcheck_exclude=SC2096 - info "running \`shellcheck --exclude ${shellcheck_exclude}\` for scripts in \$(git ls-files '*Dockerfile*')\`" + info "running \`shellcheck --exclude ${shellcheck_exclude}\` for scripts in \`\$(git ls-files '*Dockerfile*')\`" if check_install jq python3 parse-dockerfile; then shellcheck_for_dockerfile() { local text=$1