Skip to content

Commit f971e42

Browse files
authored
chore: Tagless experimental releases (#1394)
1 parent f1017ba commit f971e42

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

scripts/release.ts

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,11 @@ async function handler({
257257

258258
logger.log();
259259
logger.log(`Updating version to ${newVersion}...`);
260-
await exec(`yarn version --new-version ${newVersion}`);
260+
if (isExperimental) {
261+
await exec(`yarn version --no-git-tag-version --new-version ${newVersion}`);
262+
} else {
263+
await exec(`yarn version --new-version ${newVersion}`);
264+
}
261265
logger.success('Version updated successfully');
262266

263267
logger.log();
@@ -308,10 +312,20 @@ async function handler({
308312
process.exit(EXIT_CODES.SUCCESS);
309313
}
310314

311-
logger.log();
312-
logger.log(`Pushing changes to Github...`);
313-
await exec(gitCommand);
314-
logger.log(`Changes pushed successfully`);
315+
if (isExperimental) {
316+
logger.log();
317+
logger.log(`Experimental release: Skipping push to Github`);
318+
319+
// Reset the version back to the local version
320+
await exec(
321+
`yarn version --no-git-tag-version --new-version ${localVersion}`
322+
);
323+
} else {
324+
logger.log();
325+
logger.log(`Pushing changes to Github...`);
326+
await exec(gitCommand);
327+
logger.log(`Changes pushed successfully`);
328+
}
315329

316330
logger.log();
317331
logger.success(`HubSpot CLI version ${newVersion} published successfully`);

0 commit comments

Comments
 (0)