We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c64b8dd commit 6ea070eCopy full SHA for 6ea070e
src/main.ts
@@ -78,11 +78,21 @@ if (exitCode) {
78
const tags = stdout.split(/\r?\n/g);
79
console.assert(tags.length === 1, `tags=${tags} longer than 1`);
80
pushRefspec = tags[0];
81
- pushForce ??= true;
82
console.assert(pushForce, "push-force: false never updates tag");
83
} else {
84
pushRefspec = stdout;
85
- pushForce ??= false;
+ }
86
+ if (pushForce == null) {
87
+ const { exitCode } = await $({
88
+ cwd: rootPath,
89
+ reject: false,
90
+ })`git show-ref --verify refs/tags/${pushRefspec}`;
91
+ if (exitCode) {
92
+ pushForce = true;
93
+ } else {
94
+ // TODO: Any other force-push situations?
95
+ pushForce = false;
96
}
97
98
0 commit comments