mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
fix: include native smoke in Wails pin guard
Problem: The current-base Wails pin guard rejected the transcript native smoke workflow even though it reads the shared .wails-version pin correctly. Root cause: The guard predated the dedicated native smoke workflow and only allowed CI and release workflow install sites. Fix: Treat transcript-native-smoke.yml as a supported pinned workflow and cover it in the guard fixture. Verification: - bash scripts/check-wails-pin.sh - bash scripts/check-wails-pin.test.sh - go run ./tools/repolint
This commit is contained in:
1 parent
95b57334a1
commit
a5d1ddf585
2 files changed
+9
-2
No files matched your search
@@ -34,7 +34,12 @@ MSG
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for workflow in "$root"/.github/workflows/ci.yml "$root"/.github/workflows/release-desktop.yml; do
|
||||
workflow_pins=(
|
||||
"$root/.github/workflows/ci.yml"
|
||||
"$root/.github/workflows/release-desktop.yml"
|
||||
"$root/.github/workflows/transcript-native-smoke.yml"
|
||||
)
|
||||
for workflow in "${workflow_pins[@]}"; do
|
||||
if grep -q "cmd/wails@v" "$workflow"; then
|
||||
echo "check-wails-pin: $(basename "$workflow") hard-codes a CLI version; read .wails-version instead" >&2
|
||||
exit 1
|
||||
@@ -53,6 +58,7 @@ install_lines="$(git -C "$root" grep -nF "$module@" -- . || true)"
|
||||
unexpected_sources="$(awk -v module="$module" '
|
||||
index($0, ".github/workflows/ci.yml:") == 1 && index($0, module "@$(cat \"$GITHUB_WORKSPACE/.wails-version\")") { next }
|
||||
index($0, ".github/workflows/release-desktop.yml:") == 1 && index($0, module "@$(cat \"$GITHUB_WORKSPACE/.wails-version\")") { next }
|
||||
index($0, ".github/workflows/transcript-native-smoke.yml:") == 1 && index($0, module "@$(cat \"$GITHUB_WORKSPACE/.wails-version\")") { next }
|
||||
index($0, "Makefile:") == 1 && index($0, module "@$(WAILS_VERSION)") { next }
|
||||
index($0, "prod_test:") == 1 && index($0, module "@$wails_pin") { next }
|
||||
{ print }
|
||||
@@ -77,7 +83,7 @@ MSG
|
||||
fi
|
||||
|
||||
workflow_install="go install \"$module@\$(cat \"\$GITHUB_WORKSPACE/.wails-version\")\""
|
||||
for workflow in "$root"/.github/workflows/ci.yml "$root"/.github/workflows/release-desktop.yml; do
|
||||
for workflow in "${workflow_pins[@]}"; do
|
||||
grep -Fq "$workflow_install" "$workflow" || {
|
||||
echo "check-wails-pin: $(basename "$workflow") must install Wails from \$GITHUB_WORKSPACE/.wails-version" >&2
|
||||
exit 1
|
||||
|
||||
@@ -21,6 +21,7 @@ make_fixture() {
|
||||
printf 'github.com/wailsapp/wails/v2 %s\n' "$fixture_pin" > "$fixture/desktop/go.mod"
|
||||
printf 'run: go install "%s@$(cat "$GITHUB_WORKSPACE/.wails-version")"\n' "$wails_module" > "$fixture/.github/workflows/ci.yml"
|
||||
cp "$fixture/.github/workflows/ci.yml" "$fixture/.github/workflows/release-desktop.yml"
|
||||
cp "$fixture/.github/workflows/ci.yml" "$fixture/.github/workflows/transcript-native-smoke.yml"
|
||||
printf 'go install "%s@$wails_pin"\nwails version\n' "$wails_module" > "$fixture/prod_test"
|
||||
printf 'Run `make wails-install`.\n' > "$fixture/desktop/README.md"
|
||||
printf 'WAILS_VERSION := $(shell tr -d '\''[:space:]'\'' < .wails-version)\nwails-install:\n\tgo install "%s@$(WAILS_VERSION)"\n' "$wails_module" > "$fixture/Makefile"
|
||||
|
||||
Reference in new issue
Block a user