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
15 changes: 2 additions & 13 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,14 @@ 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
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 @@ -122,11 +113,8 @@ 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 Expand Up @@ -427,7 +415,8 @@ function _export_unset {

# Need to use a temp file to avoid a subshell
local tmpfile=$(mktemp)
grep -v '^#' $file >$tmpfile
# Use || true to handle files with only comments (grep returns 1 when no matches)
grep -v '^#' "$file" >"$tmpfile" || true

while read -r line; do
if [[ ! "$line" =~ ^[[:space:]]*$ ]]; then
Expand Down