fix(netlify-plugin-branch-sync): use 'origin/${SYNC_SOURCE}' instead of 'HEAD' as push source in refspec
This commit is contained in:
@@ -132,7 +132,13 @@ export const onPreBuild = async function ({ utils }) {
|
|||||||
|
|
||||||
for (let i = 0; i < SYNC_DEST.length; ++i) {
|
for (let i = 0; i < SYNC_DEST.length; ++i) {
|
||||||
const branch = SYNC_DEST[i]
|
const branch = SYNC_DEST[i]
|
||||||
await run("git", ["-C", CLONE_DIR, "push", "origin", `HEAD:${branch}`])
|
await run("git", [
|
||||||
|
"-C",
|
||||||
|
CLONE_DIR,
|
||||||
|
"push",
|
||||||
|
"origin",
|
||||||
|
`origin/${SYNC_SOURCE}:${branch}`,
|
||||||
|
])
|
||||||
console.log(`Successfully synced '${branch}' with '${SYNC_SOURCE}'`)
|
console.log(`Successfully synced '${branch}' with '${SYNC_SOURCE}'`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user