Update debrepo template

This commit is contained in:
ansible 2026-03-11 00:55:24 +08:00
parent c2ca40c4bb
commit f54568a60b

View File

@ -20,10 +20,11 @@ jobs:
PKG_NAME="${GITHUB_REPOSITORY##*/}"
echo "Building ${PKG_NAME} version ${VERSION}"
# Update version in debian/changelog if it exists
if [ -f debian/changelog ]; then
sed -i "1s/([^)]*)/($VERSION)/" debian/changelog
fi
# Update version in control file
sed -i "s/^Version:.*/Version: ${VERSION}/" debian/control
# dpkg-deb requires uppercase DEBIAN directory
mv debian DEBIAN
dpkg-deb --build --root-owner-group . "../${PKG_NAME}_${VERSION}_amd64.deb"
echo "DEB_FILE=$(ls ../*.deb)" >> "$GITHUB_ENV"