mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 08:02:38 +00:00
fix(cli): stage a rewritten shared lockfile on git-sync deploy push (#11126)
* fix(cli): stage a rewritten shared lockfile on git-sync deploy push Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GGciSSE5EFMiDf1dFWQq5M * test(cli): pin that a swept shared lockfile is committed as a deletion Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GGciSSE5EFMiDf1dFWQq5M * chore: bump the git sync hub script to 28969 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GGciSSE5EFMiDf1dFWQq5M --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
5dcf40cb4f
commit
75ee497011
@@ -1,6 +1,7 @@
|
||||
import * as log from "../core/log.ts";
|
||||
import { execSync, spawnSync } from "node:child_process";
|
||||
import { WM_FORK_PREFIX } from "../core/constants.ts";
|
||||
import { SHARED_LOCK_DIR } from "./script_common.ts";
|
||||
|
||||
// Fork *workspace id* prefix ("wm-fork-"). WM_FORK_PREFIX is the *branch*
|
||||
// prefix ("wm-fork") used inside the wm-fork/<branch>/<id> branch name.
|
||||
@@ -584,6 +585,11 @@ export function gitSyncDeployPush(params: {
|
||||
git(["add", "wmill-lock.yaml", `${parent_path}**`], { allowFail: true });
|
||||
}
|
||||
}
|
||||
// A shared lockfile (`dedupeLockfiles`) lives under `locks/`, outside every
|
||||
// item's path glob, and the pull rewrites it when a deployed script's lock
|
||||
// changed. `-A` also stages the deletion of a swept one; the add fails only
|
||||
// when nothing under `locks/` exists or is tracked.
|
||||
git(["add", "-A", "--", SHARED_LOCK_DIR], { allowFail: true });
|
||||
|
||||
// `git diff --cached --quiet` exits 1 iff there is something staged.
|
||||
const staged = git(["diff", "--cached", "--quiet"], { allowFail: true });
|
||||
|
||||
Reference in New Issue
Block a user