fix: dynamically detect current branch for quartz sync push (#1930)
This commit is contained in:
parent
6dd772bf00
commit
771c05ff18
1 changed files with 2 additions and 1 deletions
|
@ -589,7 +589,8 @@ export async function handleSync(argv) {
|
||||||
await popContentFolder(contentFolder)
|
await popContentFolder(contentFolder)
|
||||||
if (argv.push) {
|
if (argv.push) {
|
||||||
console.log("Pushing your changes")
|
console.log("Pushing your changes")
|
||||||
const res = spawnSync("git", ["push", "-uf", ORIGIN_NAME, QUARTZ_SOURCE_BRANCH], {
|
const currentBranch = execSync("git rev-parse --abbrev-ref HEAD").toString().trim()
|
||||||
|
const res = spawnSync("git", ["push", "-uf", ORIGIN_NAME, currentBranch], {
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
})
|
})
|
||||||
if (res.status !== 0) {
|
if (res.status !== 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue