Linux packaging: Debian package, AppImage script, release workflow
- CPack DEB configuration (cmake/Packaging.cmake): dependencies from dpkg-shlibdeps, udisks2 recommended, strip. - AppStream metadata, installed with the desktop file and the icons; tools/release.sh adds each release to it. - tools/appimage.sh: AppImage of the GTK interface and openpu-cli with linuxdeploy and its GTK plugin (x86_64 and aarch64). - Release workflow: .deb, AppImage and openpu-cli tarball for x86_64 and arm64, attached to the release of a vX.Y.Z tag, or kept as artifacts on a manual run. tools/release.sh edits the release when the workflow created it first. - The GTK interface finds its translations next to the executable (../share/locale), for relocatable installs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDASLCiN764v685boRVYar
This commit is contained in:
1 parent
bbc3bb3896
commit
ce7316af29
11 files changed
+261
-8
No files matched your search
+11
-2
@@ -25,7 +25,11 @@ grep -q "^project(openpu VERSION $VERSION " CMakeLists.txt || { echo "cannot upd
|
||||
sed -i "s/^## \[Unreleased\]$/## [Unreleased]\n\n## [$VERSION] - $TODAY/" CHANGELOG.md
|
||||
sed -i "s|^\[Unreleased\]: \(.*\)/compare/v[0-9.]*\.\.\.HEAD$|[Unreleased]: \1/compare/v$VERSION...HEAD\n[$VERSION]: \1/releases/tag/v$VERSION|" CHANGELOG.md
|
||||
|
||||
git add CMakeLists.txt CHANGELOG.md
|
||||
# AppStream metadata lists the releases, newest first.
|
||||
sed -i "s|^ <releases>$| <releases>\n <release version=\"$VERSION\" date=\"$TODAY\"/>|" data/io.github.openpu.OpenPU.metainfo.xml
|
||||
grep -q "<release version=\"$VERSION\"" data/io.github.openpu.OpenPU.metainfo.xml || { echo "cannot update the metainfo" >&2; exit 1; }
|
||||
|
||||
git add CMakeLists.txt CHANGELOG.md data/io.github.openpu.OpenPU.metainfo.xml
|
||||
# RELEASE_TRAILER: optional trailer lines appended to the release commit message (e.g. co-authors).
|
||||
git commit -q -m "release: v$VERSION" ${RELEASE_TRAILER:+-m "$RELEASE_TRAILER"}
|
||||
# Plain string comparison (not a regex: "[" and "." in the heading would be special).
|
||||
@@ -43,7 +47,12 @@ done
|
||||
GH=$(command -v gh || command -v gh.exe || true)
|
||||
[ -z "$GH" ] && [ -x "/c/Program Files/GitHub CLI/gh.exe" ] && GH="/c/Program Files/GitHub CLI/gh.exe"
|
||||
if [ -n "$GH" ]; then
|
||||
printf '%s\n' "$NOTES" | "$GH" release create "v$VERSION" --verify-tag --title "OpenPU $VERSION" --notes-file -
|
||||
# The release workflow may have created the release already (to attach the binaries).
|
||||
if "$GH" release view "v$VERSION" >/dev/null 2>&1; then
|
||||
printf '%s\n' "$NOTES" | "$GH" release edit "v$VERSION" --title "OpenPU $VERSION" --notes-file -
|
||||
else
|
||||
printf '%s\n' "$NOTES" | "$GH" release create "v$VERSION" --verify-tag --title "OpenPU $VERSION" --notes-file -
|
||||
fi
|
||||
else
|
||||
echo "gh not found: create the GitHub release for v$VERSION by hand" >&2
|
||||
fi
|
||||
Reference in new issue
Block a user