Skip to content

Commit 46e7c93

Browse files
committed
fix(script): skip tagging for format/typecheck tasks
1 parent 315d9bf commit 46e7c93

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

scripts/package_automation.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -737,13 +737,20 @@ class PackageExecutor {
737737

738738
log(`Processing package: ${packageName}`);
739739

740-
// First, check in and tag the package (like the original script)
741-
const tagResult = await this.tagPackage(context);
742-
if (tagResult.kind !== "ok") {
740+
// Check if any actions require tagging (build, test, publish, upload, push)
741+
const requiresTagging = this.config.actions.some((a) =>
742+
["build", "test", "publish", "upload", "push"].includes(a.name),
743+
);
744+
745+
// Check in and tag the package only if needed
746+
if (requiresTagging) {
747+
const tagResult = await this.tagPackage(context);
748+
if (tagResult.kind !== "ok") {
749+
results.log(packageName, "tag", tagResult);
750+
return; // Stop processing this package if tagging fails
751+
}
743752
results.log(packageName, "tag", tagResult);
744-
return; // Stop processing this package if tagging fails
745753
}
746-
results.log(packageName, "tag", tagResult);
747754

748755
for (const actionConfig of this.config.actions) {
749756
const action = this.registry.get(actionConfig.name);

0 commit comments

Comments
 (0)