mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-01-01 14:44:48 +01:00
Merge pull request #2148 from rbenv/release-same-day
release script: handle multiple releases on the same day
This commit is contained in:
commit
4d2e1cc08f
1 changed files with 7 additions and 2 deletions
|
@ -7,8 +7,6 @@
|
||||||
# - pushes master & the new tag to GitHub
|
# - pushes master & the new tag to GitHub
|
||||||
# - creates a new Release on GitHub
|
# - creates a new Release on GitHub
|
||||||
# - [automated] a GitHub Action will create a Homebrew PR for the new release
|
# - [automated] a GitHub Action will create a Homebrew PR for the new release
|
||||||
#
|
|
||||||
# TODO: handle making multiple releases on the same date
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -24,6 +22,13 @@ fi
|
||||||
|
|
||||||
binfile="bin/ruby-build"
|
binfile="bin/ruby-build"
|
||||||
new_version="$(date '+%Y%m%d')"
|
new_version="$(date '+%Y%m%d')"
|
||||||
|
|
||||||
|
version_suffix=""
|
||||||
|
while git show-ref --verify --quiet -- "refs/tags/v${new_version}${version_suffix}"; do
|
||||||
|
version_suffix=".$(( ${version_suffix#.} + 1 ))"
|
||||||
|
done
|
||||||
|
|
||||||
|
new_version="${new_version}${version_suffix}"
|
||||||
version_tag="v${new_version}"
|
version_tag="v${new_version}"
|
||||||
previous_tag="$(git describe --tags HEAD --abbrev=0)"
|
previous_tag="$(git describe --tags HEAD --abbrev=0)"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue