Skip to content

Commit

Permalink
Revert "fixed flatpak in preview"
Browse files Browse the repository at this point in the history
This reverts commit c3515c9.
  • Loading branch information
midwan committed Nov 12, 2023
1 parent c3515c9 commit 861b78c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
</screenshot>
</screenshots>
<releases>
<release version="v6.0.0" date="2023-11-12" />
<release version="@GIT_VERSION@" date="@GIT_DATE@" />
</releases>
</component>
32 changes: 32 additions & 0 deletions flatpak/generate-metainfo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash

SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))

if [[ $# -lt 1 ]]; then
echo "Output directory must be provided as a parameter"
exit 1
fi

APPID="com.blitterstudio.amiberry"
OUTDIR=$(realpath "$1")
OUTFILE="${OUTDIR}/${APPID}.metainfo.xml"

pushd "${SCRIPTDIR}" >/dev/null || exit
GIT_DATE=$(git log -1 --pretty=%cd --date=short)
GIT_HASH=$(git rev-parse HEAD)
GIT_VERSION=$(git describe --dirty | tr -d '\r\n')
if [[ "${GIT_VERSION}" == "" ]]; then
GIT_VERSION=$(git rev-parse HEAD)
fi

popd >/dev/null || exit

echo "GIT_DATE: ${GIT_DATE}"
echo "GIT_VERSION: ${GIT_VERSION}"
echo "GIT_HASH: ${GIT_HASH}"

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}"
sed -i -e "s/@GIT_HASH@/${GIT_HASH}/" "${OUTFILE}"

0 comments on commit 861b78c

Please sign in to comment.