Merge pull request #849 from littlefs-project/fix-ci-release-no-version

Fix release script breaking if there is no previous version
This commit is contained in:
Christopher Haster 2023-09-03 12:46:18 -05:00 committed by GitHub
commit e40d8f5410
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -81,7 +81,9 @@ jobs:
- name: find-prev-version
continue-on-error: true
run: |
LFS_PREV_VERSION="$(git describe --tags --abbrev=0 --match 'v*')"
LFS_PREV_VERSION="$( \
git describe --tags --abbrev=0 --match 'v*' \
|| true)"
echo "LFS_PREV_VERSION=$LFS_PREV_VERSION"
echo "LFS_PREV_VERSION=$LFS_PREV_VERSION" >> $GITHUB_ENV
@ -240,6 +242,7 @@ jobs:
run: |
# create release and patch version tag (vN.N.N)
# only draft if not a patch release
touch release.txt
[ -e table.txt ] && cat table.txt >> release.txt
echo >> release.txt
[ -e changes.txt ] && cat changes.txt >> release.txt