Skip to content

Commit 9ec30f4

Browse files
committed
chore: revert build script
1 parent cbdbbe0 commit 9ec30f4

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

scripts/publish-via-nx.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async function updatePackageVersion(pkgName, version, versionMap, dryRun) {
5959
if (!found) console.error(`Could not find '${pkgName}' in any of the folders`);
6060
}
6161

62-
async function createRelease(dryRun, version, isCi) {
62+
async function createRelease(dryRun, version, makeGitCommit) {
6363
console.log('Running nx release');
6464
const { workspaceVersion, projectsVersionData } = await releaseVersion({
6565
gitTag: false,
@@ -89,10 +89,10 @@ async function createRelease(dryRun, version, isCi) {
8989
versionData: projectsVersionData,
9090
version: workspaceVersion,
9191
verbose: true,
92-
dryRun: !isCi,
92+
dryRun,
9393
});
9494

95-
if (isCi) {
95+
if (makeGitCommit) {
9696
console.log('Committing changes');
9797
const git = simpleGit().clean(CleanOptions.FORCE);
9898

@@ -115,6 +115,7 @@ async function startReleasePipeline() {
115115

116116
const isCi = args['--ci'] ? true : false;
117117
const dryRun = isCi ? false : await confirm({ message: 'Is this a dry run?', default: true, required: true });
118+
const makeGitCommit = isCi ? false : !dryRun;
118119

119120
let version = 'patch';
120121
if (!args['--version']) {
@@ -133,7 +134,7 @@ async function startReleasePipeline() {
133134
}
134135
} else version = args['--version'];
135136

136-
await createRelease(dryRun, version, isCi);
137+
await createRelease(dryRun, version, makeGitCommit);
137138
}
138139

139140
await startReleasePipeline();

0 commit comments

Comments
 (0)