Skip to content
This repository was archived by the owner on Feb 15, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion run
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,23 @@ function build-deb {

# Set up environment
dev-env
echo "DEBUG: dev-env completed"

# Check if changelog was already generated by CI (shared-workflows)
# If debian/changelog exists and was modified in the last 5 minutes, skip regeneration
echo "DEBUG: Checking debian/changelog..."
echo "DEBUG: PWD=$(pwd)"
echo "DEBUG: ls -la debian/changelog: $(ls -la debian/changelog 2>&1 || echo 'file not found')"

if [ -f "debian/changelog" ]; then
CHANGELOG_AGE=$(($(date +%s) - $(stat -c %Y debian/changelog 2>/dev/null || stat -f %m debian/changelog)))
echo "DEBUG: debian/changelog exists, checking age..."
# Use stat -c for Linux, stat -f for macOS, handle errors gracefully
CHANGELOG_MTIME=$(stat -c %Y debian/changelog 2>/dev/null) || CHANGELOG_MTIME=$(stat -f %m debian/changelog 2>/dev/null) || CHANGELOG_MTIME=0
echo "DEBUG: CHANGELOG_MTIME=$CHANGELOG_MTIME"
CURRENT_TIME=$(date +%s)
echo "DEBUG: CURRENT_TIME=$CURRENT_TIME"
CHANGELOG_AGE=$((CURRENT_TIME - CHANGELOG_MTIME))
echo "DEBUG: CHANGELOG_AGE=$CHANGELOG_AGE"
if [ "$CHANGELOG_AGE" -lt 300 ]; then
echo "📋 Using existing debian/changelog (generated by CI)"
else
Expand All @@ -110,8 +122,11 @@ function build-deb {
--force-distribution \
"Automated release $PACKAGE_VERSION. See GitHub for details."
fi
else
echo "DEBUG: debian/changelog does not exist"
fi

echo "DEBUG: About to run dpkg-buildpackage..."
dpkg-buildpackage -us -uc -b

echo "✅ Debian package built successfully"
Expand Down