mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-14 04:55:47 -04:00
Build: Unify Flatpak manifests
This commit is contained in:
@ -3,13 +3,15 @@
|
||||
SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
|
||||
|
||||
if [[ $# -lt 1 ]]; then
|
||||
echo "Output file must be provided as a parameter"
|
||||
echo "Output directory must be provided as a parameter"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OUTFILE="$1"
|
||||
APPID="org.duckstation.DuckStation"
|
||||
OUTDIR=$(realpath "$1")
|
||||
OUTFILE="${OUTDIR}/${APPID}.metainfo.xml"
|
||||
|
||||
pushd "${SCRIPTDIR}"
|
||||
pushd "${SCRIPTDIR}" >/dev/null
|
||||
GIT_DATE=$(git log -1 --pretty=%cd --date=short)
|
||||
GIT_VERSION=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse HEAD)
|
||||
@ -20,13 +22,13 @@ if [[ "${GIT_VERSION}" == "" ]]; then
|
||||
GIT_VERSION=$(git rev-parse HEAD)
|
||||
fi
|
||||
fi
|
||||
popd
|
||||
popd >/dev/null
|
||||
|
||||
echo "GIT_DATE: ${GIT_DATE}"
|
||||
echo "GIT_VERSION: ${GIT_VERSION}"
|
||||
echo "GIT_HASH: ${GIT_HASH}"
|
||||
|
||||
cp "${SCRIPTDIR}"/org.duckstation.duckstation.metainfo.xml.in "${OUTFILE}"
|
||||
cp "${SCRIPTDIR}/${APPID}.metainfo.xml.in" "${OUTFILE}"
|
||||
|
||||
sed -i -e "s/@GIT_VERSION@/${GIT_VERSION}/" "${OUTFILE}"
|
||||
sed -i -e "s/@GIT_DATE@/${GIT_DATE}/" "${OUTFILE}"
|
||||
|
Reference in New Issue
Block a user