wf test
This commit is contained in:
@@ -66,8 +66,6 @@ jobs:
|
|||||||
UPDATES_FOUND=false
|
UPDATES_FOUND=false
|
||||||
UPDATED_PACKAGES=""
|
UPDATED_PACKAGES=""
|
||||||
|
|
||||||
# List of packages to IGNORE (known incompatible with nix-update)
|
|
||||||
# These either have complex src attributes or non-standard versioning
|
|
||||||
IGNORE_PACKAGES=(
|
IGNORE_PACKAGES=(
|
||||||
"hyprpaper-random"
|
"hyprpaper-random"
|
||||||
"launch-webapp"
|
"launch-webapp"
|
||||||
@@ -87,27 +85,28 @@ jobs:
|
|||||||
local pkg=$1
|
local pkg=$1
|
||||||
local before_hash=$(git rev-parse HEAD)
|
local before_hash=$(git rev-parse HEAD)
|
||||||
|
|
||||||
# Check if package is ignored
|
# IGNORE CHECKS
|
||||||
for ignore in "${IGNORE_PACKAGES[@]}"; do
|
for ignore in "${IGNORE_PACKAGES[@]}"; do
|
||||||
if [ "$pkg" = "$ignore" ]; then
|
if [ "$pkg" = "$ignore" ]; then
|
||||||
echo "ℹ️ Skipping $pkg (in ignore list)"
|
echo "ℹ️ Skipping $pkg (in ignore list)"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Base args: Flake mode, Commit changes, Use GitHub Releases API
|
||||||
|
# --use-github-releases ensures we only get "Latest Release" (ignoring pre-releases/random tags)
|
||||||
|
local args=("--flake" "--commit" "--use-github-releases")
|
||||||
|
|
||||||
# Build arguments array
|
# Special configuration
|
||||||
local args=("--flake" "--commit")
|
|
||||||
|
|
||||||
# Special handling for opencode
|
|
||||||
if [ "$pkg" = "opencode" ]; then
|
if [ "$pkg" = "opencode" ]; then
|
||||||
echo "ℹ️ Adding --subpackage node_modules for opencode"
|
echo "ℹ️ Config for opencode: --subpackage node_modules"
|
||||||
args+=("--subpackage" "node_modules")
|
args+=("--subpackage" "node_modules")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add package name
|
|
||||||
args+=("$pkg")
|
args+=("$pkg")
|
||||||
|
|
||||||
echo "Checking $pkg..."
|
echo "Checking $pkg..."
|
||||||
|
# We allow failure (exit 0) so one package doesn't crash the whole loop
|
||||||
if nix-update "${args[@]}" 2>&1 | tee /tmp/update-${pkg}.log; then
|
if nix-update "${args[@]}" 2>&1 | tee /tmp/update-${pkg}.log; then
|
||||||
if [ "$(check_commit "$before_hash")" = "true" ]; then
|
if [ "$(check_commit "$before_hash")" = "true" ]; then
|
||||||
echo "✓ Updated $pkg"
|
echo "✓ Updated $pkg"
|
||||||
@@ -136,7 +135,6 @@ jobs:
|
|||||||
|
|
||||||
if [ -z "$PACKAGES" ]; then
|
if [ -z "$PACKAGES" ]; then
|
||||||
echo "No packages found to update"
|
echo "No packages found to update"
|
||||||
echo "has_updates=false" >> $GITHUB_OUTPUT
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -183,8 +181,6 @@ jobs:
|
|||||||
|
|
||||||
echo "Checking for dirty state..."
|
echo "Checking for dirty state..."
|
||||||
git status --porcelain
|
git status --porcelain
|
||||||
|
|
||||||
echo "Resetting any unstaged changes (e.g. dirty lockfiles) before rebase..."
|
|
||||||
git reset --hard HEAD
|
git reset --hard HEAD
|
||||||
|
|
||||||
echo "Pulling latest changes (rebase)..."
|
echo "Pulling latest changes (rebase)..."
|
||||||
|
|||||||
Reference in New Issue
Block a user