1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2026-02-08 00:32:27 +00:00

Add version to build packages.

This commit is contained in:
Filippo Scognamiglio
2026-01-19 00:13:15 +01:00
parent 33878dae24
commit a6a7768e42
2 changed files with 13 additions and 2 deletions

View File

@@ -6,6 +6,10 @@ REPO_ROOT="$(readlink -f "$(dirname "$(dirname "$0")")")"
OLD_CWD="$(readlink -f .)"
BUILD_DIR="$REPO_ROOT/build/appimage"
TOOLS_DIR="$BUILD_DIR/tools"
VERSION="$(git -C "$REPO_ROOT" describe --tags --always --dirty=-dirty 2>/dev/null || true)"
if [ -z "$VERSION" ]; then
VERSION="unknown"
fi
if ! command -v qmake >/dev/null; then
echo "qmake not found in PATH." >&2
@@ -73,5 +77,7 @@ export LINUXDEPLOY_EXCLUDED_LIBRARIES="libmysqlclient.so;libqsqlmimer.so;libqsql
--plugin qt \
--output appimage
mv ./*.AppImage "$OLD_CWD"
APPIMAGE_PATH="$(ls -1 ./*.AppImage | head -n 1)"
APPIMAGE_OUT="cool-retro-term-${VERSION}.AppImage"
mv "$APPIMAGE_PATH" "$OLD_CWD/$APPIMAGE_OUT"
popd

View File

@@ -8,6 +8,10 @@ BUILD_DIR="$REPO_ROOT/build/dmg"
APP="cool-retro-term.app"
QML_DIR="$REPO_ROOT/app/qml"
JOBS="${JOBS:-$(sysctl -n hw.ncpu 2>/dev/null || echo 4)}"
VERSION="$(git -C "$REPO_ROOT" describe --tags --always --dirty=-dirty 2>/dev/null || true)"
if [ -z "$VERSION" ]; then
VERSION="unknown"
fi
if ! command -v qmake >/dev/null; then
echo "qmake not found in PATH." >&2
@@ -32,5 +36,6 @@ export QML_IMPORT_PATH="$PWD/$APP/Contents/PlugIns"
"$QT_BIN/macdeployqt" "$APP" -qmldir="$QML_DIR" -dmg
rm -f "$APP/Contents/PlugIns/sqldrivers/"libqsql{odbc,psql,mimer}.dylib 2>/dev/null || true
mv "$BUILD_DIR/${APP%.app}.dmg" "$OLD_CWD/"
DMG_OUT="${APP%.app}-${VERSION}.dmg"
mv "$BUILD_DIR/${APP%.app}.dmg" "$OLD_CWD/$DMG_OUT"
popd