CI: Fix Flatpak version generation

This commit is contained in:
Stenzek 2023-10-08 23:20:28 +10:00
parent 5c0dab4fe8
commit dcfc48d84b
No known key found for this signature in database

View file

@ -13,15 +13,12 @@ OUTFILE="${OUTDIR}/${APPID}.metainfo.xml"
pushd "${SCRIPTDIR}" >/dev/null pushd "${SCRIPTDIR}" >/dev/null
GIT_DATE=$(git log -1 --pretty=%cd --date=short) GIT_DATE=$(git log -1 --pretty=%cd --date=short)
GIT_VERSION=$(git tag --points-at HEAD)
GIT_HASH=$(git rev-parse HEAD) GIT_HASH=$(git rev-parse HEAD)
GIT_VERSION=$(git describe --dirty | tr -d '\r\n')
if [[ "${GIT_VERSION}" == "" ]]; then if [[ "${GIT_VERSION}" == "" ]]; then
GIT_VERSION=$(git describe --dirty | tr -d '\r\n')
if [[ "${GIT_VERSION}" == "" ]]; then
GIT_VERSION=$(git rev-parse HEAD) GIT_VERSION=$(git rev-parse HEAD)
fi
fi fi
popd >/dev/null popd >/dev/null
echo "GIT_DATE: ${GIT_DATE}" echo "GIT_DATE: ${GIT_DATE}"