diff --git a/.github/scripts/rename-packages.sh b/.github/scripts/rename-packages.sh index b8763c1..2a06c53 100755 --- a/.github/scripts/rename-packages.sh +++ b/.github/scripts/rename-packages.sh @@ -37,8 +37,10 @@ if [ -z "$VERSION" ] || [ -z "$DISTRO" ] || [ -z "$COMPONENT" ]; then exit 1 fi -# Package name and architecture -PACKAGE_NAME="halpi2-daemon" +# Package name - use PACKAGE_NAME env var (from workflow) or read from debian/control +if [ -z "${PACKAGE_NAME:-}" ]; then + PACKAGE_NAME=$(grep "^Source:" debian/control | cut -d: -f2 | tr -d ' ') +fi ARCH="arm64" OLD_NAME="${PACKAGE_NAME}_${VERSION}_${ARCH}.deb"