From b8b47dfcd052b1713584b1d235d94d89b6ab0def Mon Sep 17 00:00:00 2001 From: Brian Olsen Date: Sat, 9 Oct 2021 18:14:20 +0200 Subject: [PATCH 1/2] Have build date include minutes --- Scripts/plist.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/plist.bash b/Scripts/plist.bash index 235bcd4..71df4a2 100644 --- a/Scripts/plist.bash +++ b/Scripts/plist.bash @@ -9,7 +9,7 @@ set -x PATH=$PATH:/usr/local/bin:/usr/bin:/sw/bin:/opt/local/bin buildid=`git log -n1 --pretty=oneline --format=%h` release=`cat "$SCRIPT_INPUT_FILE_0"` -builddate=`date +%y.%m.%d.%H` +builddate=`date +%y.%m%d.%H%M` major="$(echo $release | cut -d . -f 1 -)" minor="$(echo $release | cut -d . -f 2 -)" From ae04a7defa0dfd158b544aa9a893ffe12addcfa4 Mon Sep 17 00:00:00 2001 From: Brian Olsen Date: Tue, 26 Apr 2022 14:39:56 +0200 Subject: [PATCH 2/2] Fix PR build --- Scripts/plist.bash | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Scripts/plist.bash b/Scripts/plist.bash index 71df4a2..7bea19d 100644 --- a/Scripts/plist.bash +++ b/Scripts/plist.bash @@ -18,17 +18,20 @@ while git show-ref --tags --quiet --verify -- "refs/tags/v${major}.${minor}" ; d ((minor = $minor + 1)) done if [[ -n "$GITHUB_REF" ]]; then - if [[ $GITHUB_REF != refs/tags/* ]]; then - number="$(git rev-list --count "$GITHUB_REF")" - release="${major}.${minor}.beta-$number" - else + if [[ $GITHUB_REF = refs/tags/* ]]; then ((minors = $minor - 1)) if [[ "$GITHUB_REF" == "refs/tags/v${major}.${minors}" ]]; then - release="${major}.${minors}" + release="${major}.${minors}" else - release=${GITHUB_REF#refs/tags/v} - #release="${major}.${minor}" + release=${GITHUB_REF#refs/tags/v} + #release="${major}.${minor}" fi + elif [[ $GITHUB_REF = refs/pull/* ]]; then + number="$(echo "$GITHUB_REF" | awk -F / '{ print $3 }')" + release="${major}.${minor}.pr-$number" + else + number="$(git rev-list --count "$GITHUB_REF")" + release="${major}.${minor}.beta-$number" fi else release="${major}.${minor}"