diff --git a/.gitignore b/.gitignore index 025d503f6..4ffac2bfb 100644 --- a/.gitignore +++ b/.gitignore @@ -344,6 +344,8 @@ ac-vst/vst3sdk/ # + the root alias (notepat.com.amxd above) but don't bloat the repo # with per-build binaries. system/public/m4l/notepat.com/*.amxd +# deploy.fish writes this post-pull on lith — not a dev artifact. +system/public/.commit-ref # Emacs performance logs (keep directory, ignore log files) .emacs-logs/*.log diff --git a/ac-m4l/build-notepat.mjs b/ac-m4l/build-notepat.mjs index a6b9b1ff6..2f30ae193 100644 --- a/ac-m4l/build-notepat.mjs +++ b/ac-m4l/build-notepat.mjs @@ -48,13 +48,15 @@ function gitHash() { } function gitDirty() { + // Only tracked-file modifications count as "dirty" for versioning — + // stray untracked files on the server (like deploy.fish's + // system/public/.commit-ref) shouldn't make every deploy's version + // look like a dev build. try { - const out = execSync("git status --porcelain", { cwd: REPO_ROOT }) - .toString() - .trim(); - return out.length > 0; - } catch { + execSync("git diff --quiet HEAD --", { cwd: REPO_ROOT, stdio: "pipe" }); return false; + } catch { + return true; } }