Skip to content

Commit 73711b0

Browse files
ci: fix Windows lint-paths false positive; soften release-prod tag check; bump to 1.0.1
Two longstanding CI failures (every push since the public-repo extraction): 1. lint-paths.mjs (Windows): SELF_EXCLUDE compared against the literal 'scripts/lint-paths.mjs', but walk() yields backslash-separated paths on Windows ('scripts\\lint-paths.mjs'), so the script never excluded itself — read its own regex examples and failed. Fixed by comparing basename only (cross-platform). 2. release-prod.yml: every push to main hard-failed because the workflow refused to release when the tag already existed (v1.0.0 from initial release). Softened to skip-not-fail: if the tag is already there, log "no version bump, skipping release" and exit 0. Lints + tests still run on every push; release only fires when package.json version is actually bumped. Bumped package.json 1.0.0 → 1.0.1 to release the accumulated changes since 1.0.0: - architect: MCP-first decision tree + tool discovery + trigger flow - sync flag fix (lua sync --pull → --accept) - /lua-init: optional --promo-code prompt - new lint-cli-flags.mjs guard against known-wrong CLI flags Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5537958 commit 73711b0

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

.github/workflows/release-prod.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,19 @@ jobs:
7676
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
7777
echo "Production version: ${VERSION}"
7878
79-
- name: Verify tag does not already exist
79+
- name: Check if tag already exists
80+
id: tag_check
8081
working-directory: ${{ github.workspace }}
8182
run: |
8283
if git rev-parse "${{ steps.version.outputs.tag }}" >/dev/null 2>&1; then
83-
echo "::error::Tag ${{ steps.version.outputs.tag }} already exists. Bump plugins/lua-agent-builder/package.json version before merging to main."
84-
exit 1
84+
echo "Tag ${{ steps.version.outputs.tag }} already exists — no version bump in this push, skipping release. (Lints + tests still ran.)"
85+
echo "skip=true" >> "$GITHUB_OUTPUT"
86+
else
87+
echo "skip=false" >> "$GITHUB_OUTPUT"
8588
fi
8689
8790
- name: Build release tarball
91+
if: steps.tag_check.outputs.skip != 'true'
8892
# scripts/pack.mjs handles the MCP dist/ inclusion. Production
8993
# tags use the package.json version verbatim — no override needed.
9094
run: |
@@ -94,6 +98,7 @@ jobs:
9498
echo "TARBALL=plugins/lua-agent-builder/${TARBALL}" >> "$GITHUB_ENV"
9599
96100
- name: Create GitHub release
101+
if: steps.tag_check.outputs.skip != 'true'
97102
uses: softprops/action-gh-release@v2
98103
with:
99104
tag_name: ${{ steps.version.outputs.tag }}

plugins/lua-agent-builder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "claude-code-lua-plugin",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Plugin assets for the lua-agent-builder Claude Code plugin",
55
"private": true,
66
"type": "module",

plugins/lua-agent-builder/scripts/lint-paths.mjs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// the developer is expected to know what they're doing.
1616

1717
import { readdir, readFile, stat } from 'node:fs/promises';
18-
import { join, extname } from 'node:path';
18+
import { join, extname, basename } from 'node:path';
1919

2020
const ROOT = '.';
2121
const SCAN_DIRS = ['lib', 'hooks', 'scripts'];
@@ -30,8 +30,10 @@ const PATH_HELPER_RE = /(?<![.\w])(join|resolve|relative)\(\s*['"][^'"]*\/[^'"]*
3030
let failed = false;
3131

3232
// Self-exclude: lint-paths.mjs inherently contains the patterns it warns
33-
// against (in error messages and examples). Listed here, not detected.
34-
const SELF_EXCLUDE = new Set(['scripts/lint-paths.mjs']);
33+
// against (in error messages and examples). Compare by basename so the
34+
// check is cross-platform (Windows yields 'scripts\\lint-paths.mjs' from
35+
// walk(), POSIX yields 'scripts/lint-paths.mjs' — basename normalises both).
36+
const SELF_EXCLUDE = new Set(['lint-paths.mjs']);
3537

3638
async function* walk(dir) {
3739
for (const entry of await readdir(dir)) {
@@ -45,8 +47,7 @@ async function* walk(dir) {
4547
for (const dir of SCAN_DIRS) {
4648
try {
4749
for await (const file of walk(join(ROOT, dir))) {
48-
const relative = file.replace(/^\.\//, '');
49-
if (SELF_EXCLUDE.has(relative)) continue;
50+
if (SELF_EXCLUDE.has(basename(file))) continue;
5051
const content = await readFile(file, 'utf8');
5152
const matches = content.match(PATH_HELPER_RE);
5253
if (matches) {

0 commit comments

Comments
 (0)