File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,14 +68,14 @@ jobs:
6868 gh_last_commit=$(git log -1 --format=%cs)
6969 echo "last commit: $gh_last_commit"
7070
71- # Last release
72- if [ $(git rev-list --tags --max-count=1) ]; then
73- gh_last_release=$(git describe --tags $(git rev-list --tags --max-count=1))
74- else
75- gh_last_release=""
76- fi
71+ # Last release. Really this is the last tag.
72+ # if [ $(git rev-list --tags --max-count=1) ]; then
73+ # gh_last_release=$(git describe --tags $(git rev-list --tags --max-count=1))
74+ # else
75+ # gh_last_release=""
76+ # fi
7777
78- echo "last GitHub release : $gh_last_release"
78+ # echo "last GitHub release: $gh_last_release"
7979
8080 # If there is a NAMES file then parse it to get the functino list and save the output
8181 if [ -f "NAMESPACE" ]; then
9595 echo "API response:"
9696 cat gh_repo_info.json
9797
98+ # Get the last release name or tag name from the API response
9899 gh_last_release=$(cat gh_repo_info.json | jq '.latestRelease.name')
99- echo "GitHub last release : $gh_last_release"
100+ if [ -z "${gh_last_release}" ] || [ "${gh_last_release}" = '""' ]; then
101+ gh_last_release=$(cat gh_repo_info.json | jq '.latestRelease.tagName')
102+ if [ -z "${gh_last_release}" ] || [ "${gh_last_release}" = '""' ]; then
103+ gh_last_release=""
104+ fi
105+ fi
106+ echo "GitHub last release : $gh_last_release"
100107
101108
102109 # Get the license as it appears in GitHub
You can’t perform that action at this time.
0 commit comments