cmux/tests/test_ci_create_dmg_pinned.sh
Lawrence Chen c7eec9fbb5
Pin create-dmg version in signed build workflows (#401)
* Pin create-dmg version in release workflows

* Bump pinned create-dmg to 8.0.0
2026-02-25 19:30:10 -08:00

25 lines
769 B
Bash
Executable file

#!/usr/bin/env bash
# Regression test for https://github.com/manaflow-ai/cmux/issues/387.
# Ensures release workflows pin create-dmg to an explicit version.
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
WORKFLOWS=(
"$ROOT_DIR/.github/workflows/release.yml"
"$ROOT_DIR/.github/workflows/nightly.yml"
)
for workflow in "${WORKFLOWS[@]}"; do
if ! grep -Eq 'npm install --global .*create-dmg@' "$workflow"; then
echo "FAIL: $workflow must install create-dmg with an explicit version"
exit 1
fi
if grep -Eq 'npm install --global[[:space:]]+create-dmg([[:space:]]|$)' "$workflow"; then
echo "FAIL: $workflow still has unpinned create-dmg install"
exit 1
fi
done
echo "PASS: create-dmg install is pinned in release workflows"