Skip to content

Commit b46e8d1

Browse files
authored
Merge pull request #99 from buildo/98-human_validation_of_computed
#98: human validation of computed version should be optional (closes #98)
2 parents 6b18bf3 + 1933585 commit b46e8d1

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/config.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ const Config = t.interface({
4444
noUntrackedFiles: t.Boolean,
4545
validNpmCredentials: t.Boolean,
4646
validGithubToken: t.Boolean,
47-
packageFilesFilter: t.union([t.enums.of(['npmignore', 'files']), t.Boolean])
47+
packageFilesFilter: t.union([t.enums.of(['npmignore', 'files']), t.Boolean]),
48+
npmVersionConfirmation: t.Boolean
4849
}),
4950
tasks: t.interface({
5051
changelog: t.maybe(t.Boolean),
@@ -54,7 +55,7 @@ const Config = t.interface({
5455
'gh-release': t.maybe(t.Boolean),
5556
'gh-release-all': t.maybe(t.Boolean)
5657
})
57-
});
58+
}, { name: 'SmoothReleaseRC' });
5859

5960
const defaultConfig = {
6061
github: {
@@ -82,7 +83,8 @@ const defaultConfig = {
8283
noUntrackedFiles: true,
8384
validNpmCredentials: true,
8485
validGithubToken: true,
85-
packageFilesFilter: 'files'
86+
packageFilesFilter: 'files',
87+
npmVersionConfirmation: true
8688
},
8789
tasks: {
8890
validations: true,

src/npm/version.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
rl,
1414
exec
1515
} from '../utils';
16+
import config from '../config';
1617

1718
const stdio = [process.stdin, null, process.stderr];
1819

@@ -175,7 +176,9 @@ export default async ({ manualVersion, dataType }) => {
175176
packageJsonVersion: getPackageJsonVersion()
176177
});
177178

178-
await confirmation(releaseInfo);
179+
if (config.publish.npmVersionConfirmation) {
180+
await confirmation(releaseInfo);
181+
}
179182

180183
await version(releaseInfo);
181184
};

0 commit comments

Comments
 (0)