Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Add check for duplicate tags
James Coleee11a8e3a092
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 92a31c48be..6bbb029498 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -147,16 +147,34 @@ jobs:composer dump-autoloadreleaseName=$version- zipName=FireflyIII-$version.zip+ originalName=$versiontarName=FireflyIII-$version.tar.gzif [[ "develop" == "$version" ]]; then[[ -z $(git status --untracked-files=normal --porcelain) ]] && echo "this branch is clean, no need to push..." && exit 0;releaseName=$version-$(date +'%Y%m%d')+ originalName=$releaseNamezipName=FireflyIII-develop.ziptarName=FireflyIII-develop.tar.gzfi+ # in both cases, if the release or tag already exists, add ".1" until it no longer exists.+ tagFound=true+ tagCount=1+ while [ $tagFound ]+ do+ if [ $(git tag -l "$releaseName") ]; then+ echo "Tag $releaseName exists already."+ releaseName="$originalName"."$tagCount"+ echo "Tag for release is now $releaseName"+ else+ echo "Tag $releaseName does not exist, can continue"+ tagFound=false+ fi+ done+ echo "Will use tag and release name $releaseName."+ exit 0+git add -Aif test -f "output.txt"; thengit reset output.txt