| | |
| | | } |
| | | |
| | | function gitPull(origin, branch) { |
| | | spawnSync("git", ["fetch", origin, branch], { stdio: "inherit" }) |
| | | spawnSync("git", ["checkout", `${origin}/${branch}`, "--", ":(exclude)content"], { |
| | | stdio: "inherit", |
| | | }).error |
| | | const flags = ["-s", "recursive", "-X", "ours"] |
| | | spawnSync("git", ["pull", ...flags, origin, branch], { stdio: "inherit" }) |
| | | } |
| | | |
| | | yargs(hideBin(process.argv)) |
| | |
| | | await popContentFolder(contentFolder) |
| | | if (argv.push) { |
| | | console.log("Pushing your changes") |
| | | spawnSync("git", ["push", ORIGIN_NAME, QUARTZ_SOURCE_BRANCH], { stdio: "inherit" }) |
| | | spawnSync("git", ["push", "-f", ORIGIN_NAME, QUARTZ_SOURCE_BRANCH], { stdio: "inherit" }) |
| | | } |
| | | |
| | | console.log(chalk.green("Done!")) |