appimage: use git show for hash of current checkout state

This switches the 'remotes/origin/HEAD' and uses the current HEAD of the
current checked out git repo.

Revised the sed rule that is transforming (to be more specific on the
 matching regex /-\d+-g/ than just the first /-/):

8.3.530-7-gb64321d4 => 8.3.530+7-gb64321d4 (replace first '-' with '+'
 to indicate it is tag plus this many commits)
8.3.530 => 8.3.530 (no change)
This commit is contained in:
Darryl L. Miles
2025-07-27 21:06:19 -04:00
committed by R. Timothy Edwards
parent 62a99f6167
commit e701b6d594
8 changed files with 16 additions and 12 deletions
+3 -2
View File
@@ -66,7 +66,7 @@ jobs:
echo GITHUB_REF=$GITHUB_REF
echo GITHUB_SHA=$GITHUB_SHA
git fetch --tags --no-progress --quiet # fetch-tags: true # did not work
git_describe=$(git describe $GITHUB_SHA | sed -e 's#-#+#')
git_describe=$(git describe --tags $GITHUB_SHA | sed -e 's#\-\([0-9]\+\-g\)#\+\1#') # /-\d+-g/
# RELEASE-NOTES-EL10.txt
echo "### ${MAGIC_APPIMAGE_OUTPUT_FILENAME} commit ${git_describe}" | sed -e 's#~#\\~#g' > RELEASE-NOTES-EL10.txt
@@ -85,7 +85,8 @@ jobs:
echo "" >> RELEASE-NOTES-EL10.txt
# RELEASE-NOTES-CL.txt
git_previous_tag=$(git describe --tags --abbrev=0 ${GITHUB_SHA}~1)
git_previous_tag=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1))
echo git_previous_tag=$git_previous_tag
if [ -n "${git_previous_tag}" ]
then
echo "### Change Log (since previous tag):" > RELEASE-NOTES-CL.txt
+3 -2
View File
@@ -66,7 +66,7 @@ jobs:
echo GITHUB_REF=$GITHUB_REF
echo GITHUB_SHA=$GITHUB_SHA
git fetch --tags --no-progress --quiet # fetch-tags: true # did not work
git_describe=$(git describe $GITHUB_SHA | sed -e 's#-#+#')
git_describe=$(git describe --tags $GITHUB_SHA | sed -e 's#\-\([0-9]\+\-g\)#\+\1#') # /-\d+-g/
# RELEASE-NOTES-EL7.txt
echo "### ${MAGIC_APPIMAGE_OUTPUT_FILENAME} commit ${git_describe}" | sed -e 's#~#\\~#g' > RELEASE-NOTES-EL7.txt
@@ -85,7 +85,8 @@ jobs:
echo "" >> RELEASE-NOTES-EL7.txt
# RELEASE-NOTES-CL.txt
git_previous_tag=$(git describe --tags --abbrev=0 ${GITHUB_SHA}~1)
git_previous_tag=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1))
echo git_previous_tag=$git_previous_tag
if [ -n "${git_previous_tag}" ]
then
echo "### Change Log (since previous tag):" > RELEASE-NOTES-CL.txt
+3 -2
View File
@@ -66,7 +66,7 @@ jobs:
echo GITHUB_REF=$GITHUB_REF
echo GITHUB_SHA=$GITHUB_SHA
git fetch --tags --no-progress --quiet # fetch-tags: true # did not work
git_describe=$(git describe $GITHUB_SHA | sed -e 's#-#+#')
git_describe=$(git describe --tags $GITHUB_SHA | sed -e 's#\-\([0-9]\+\-g\)#\+\1#') # /-\d+-g/
# RELEASE-NOTES-EL8.txt
echo "### ${MAGIC_APPIMAGE_OUTPUT_FILENAME} commit ${git_describe}" | sed -e 's#~#\\~#g' > RELEASE-NOTES-EL8.txt
@@ -85,7 +85,8 @@ jobs:
echo "" >> RELEASE-NOTES-EL8.txt
# RELEASE-NOTES-CL.txt
git_previous_tag=$(git describe --tags --abbrev=0 ${GITHUB_SHA}~1)
git_previous_tag=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1))
echo git_previous_tag=$git_previous_tag
if [ -n "${git_previous_tag}" ]
then
echo "### Change Log (since previous tag):" > RELEASE-NOTES-CL.txt
+3 -2
View File
@@ -66,7 +66,7 @@ jobs:
echo GITHUB_REF=$GITHUB_REF
echo GITHUB_SHA=$GITHUB_SHA
git fetch --tags --no-progress --quiet # fetch-tags: true # did not work
git_describe=$(git describe $GITHUB_SHA | sed -e 's#-#+#')
git_describe=$(git describe --tags $GITHUB_SHA | sed -e 's#\-\([0-9]\+\-g\)#\+\1#') # /-\d+-g/
# RELEASE-NOTES-EL9.txt
echo "### ${MAGIC_APPIMAGE_OUTPUT_FILENAME} commit ${git_describe}" | sed -e 's#~#\\~#g' > RELEASE-NOTES-EL9.txt
@@ -85,7 +85,8 @@ jobs:
echo "" >> RELEASE-NOTES-EL9.txt
# RELEASE-NOTES-CL.txt
git_previous_tag=$(git describe --tags --abbrev=0 ${GITHUB_SHA}~1)
git_previous_tag=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1))
echo git_previous_tag=$git_previous_tag
if [ -n "${git_previous_tag}" ]
then
echo "### Change Log (since previous tag):" > RELEASE-NOTES-CL.txt