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:
parent
62a99f6167
commit
e701b6d594
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ ARCH := $(shell uname -m)
|
|||
APPIMAGE = Magic-$(ARCH).AppImage
|
||||
VERSION_MAGIC := $(shell cat $(MAGIC_SRC_ROOT)/VERSION)
|
||||
VERSION_TSTAMP := $(shell git show -s "--format=%cs" | tr -d '-')
|
||||
VERSION_HASH := $(shell git show-ref --hash=7 remotes/origin/HEAD)
|
||||
VERSION_HASH := $(shell git show -s "--format=%h")
|
||||
VERSION_NUM ?= $(VERSION_MAGIC)~$(VERSION_TSTAMP)~$(VERSION_HASH)
|
||||
VERSION := $(VERSION_NUM)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ ARCH := $(shell uname -m)
|
|||
APPIMAGE = Magic-$(ARCH).AppImage
|
||||
VERSION_MAGIC := $(shell cat $(MAGIC_SRC_ROOT)/VERSION)
|
||||
VERSION_TSTAMP := $(shell git show -s "--format=%cs" | tr -d '-')
|
||||
VERSION_HASH := $(shell git show-ref --hash=7 remotes/origin/HEAD)
|
||||
VERSION_HASH := $(shell git show -s "--format=%h")
|
||||
VERSION_NUM ?= $(VERSION_MAGIC)~$(VERSION_TSTAMP)~$(VERSION_HASH)
|
||||
VERSION := $(VERSION_NUM)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ ARCH := $(shell uname -m)
|
|||
APPIMAGE = Magic-$(ARCH).AppImage
|
||||
VERSION_MAGIC := $(shell cat $(MAGIC_SRC_ROOT)/VERSION)
|
||||
VERSION_TSTAMP := $(shell git show -s "--format=%cs" | tr -d '-')
|
||||
VERSION_HASH := $(shell git show-ref --hash=7 remotes/origin/HEAD)
|
||||
VERSION_HASH := $(shell git show -s "--format=%h")
|
||||
VERSION_NUM ?= $(VERSION_MAGIC)~$(VERSION_TSTAMP)~$(VERSION_HASH)
|
||||
VERSION := $(VERSION_NUM)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ ARCH := $(shell uname -m)
|
|||
APPIMAGE = Magic-$(ARCH).AppImage
|
||||
VERSION_MAGIC := $(shell cat $(MAGIC_SRC_ROOT)/VERSION)
|
||||
VERSION_TSTAMP := $(shell git show -s "--format=%cs" | tr -d '-')
|
||||
VERSION_HASH := $(shell git show-ref --hash=7 remotes/origin/HEAD)
|
||||
VERSION_HASH := $(shell git show -s "--format=%h")
|
||||
VERSION_NUM ?= $(VERSION_MAGIC)~$(VERSION_TSTAMP)~$(VERSION_HASH)
|
||||
VERSION := $(VERSION_NUM)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue