fix: resolve publish lock in git worktree
This commit is contained in:
parent
423aff6519
commit
4ff84ac677
2 changed files with 3 additions and 2 deletions
|
|
@ -14,7 +14,7 @@
|
|||
"verify": "PASS"
|
||||
},
|
||||
"artifacts": {
|
||||
"finalizer_sha256": "1868a1bd907cb5f90c3559f3e460572da666cd22fbe96ff305a36aa9a0a72474",
|
||||
"finalizer_sha256": "7a115b47a564141f813b96861554d28e0270e7a305f3ff9be1bad46930729541",
|
||||
"reflection_advisor_sha256": "b6071f4a3bb3a482e30a60b6a1861bd263b45dd23256944291bcb1d354b45022",
|
||||
"tcs_sha256": "10780d36e71df32c4d11dc299550755ed5d191b9a4435638d5e1d283c40a3222"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ export function validateCurrentTcsBinding(stateDirectory, expectedSession = proc
|
|||
}
|
||||
|
||||
function acquireCurrentPublishLock(worktree, developmentId, binding) {
|
||||
const lockPath = path.join(worktree, ".git", "guanghu-current-tcs-publish.lock");
|
||||
const gitDirectory = path.resolve(worktree, git(worktree, ["rev-parse", "--git-dir"]));
|
||||
const lockPath = path.join(gitDirectory, "guanghu-current-tcs-publish.lock");
|
||||
const descriptor = fs.openSync(lockPath, "wx", 0o600);
|
||||
fs.writeFileSync(descriptor, `${JSON.stringify({ development_id: developmentId, binding, created_at: new Date().toISOString() })}\n`);
|
||||
return { descriptor, lockPath };
|
||||
|
|
|
|||
Loading…
Reference in a new issue