@oneblink/release-cli 3.2.1 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js CHANGED
@@ -34,6 +34,8 @@ ${chalk.grey('Release a single repository.')}
34
34
 
35
35
  --no-git ....... Skip committing changes and creating an annotated git tag.
36
36
 
37
+ --increment .... Increment the version automatically using "major" | "minor" | "patch".
38
+
37
39
  --name ......... Skip the question to enter a name for the release by passing
38
40
  a release name as a flag.
39
41
 
@@ -49,6 +51,9 @@ ${chalk.bold('Examples')}
49
51
  oneblink-release repository
50
52
  oneblink-release repository --no-name
51
53
  oneblink-release repository --name="Inappropriate Release Name"
54
+ oneblink-release repository --increment="major"
55
+ oneblink-release repository --increment="minor"
56
+ oneblink-release repository --increment="patch"
52
57
  oneblink-release repository 1.1.1
53
58
  oneblink-release repository 1.1.1 --cwd ../path/to/code
54
59
  oneblink-release repository 1.1.1-uat.1 --no-git
@@ -83,6 +88,10 @@ ${chalk.bold('Examples')}
83
88
  name: {
84
89
  type: 'string',
85
90
  },
91
+ increment: {
92
+ type: 'string',
93
+ choices: ['major', 'minor', 'patch'],
94
+ },
86
95
  cwd: {
87
96
  type: 'string',
88
97
  default: process.cwd(),
@@ -129,6 +138,14 @@ async function run() {
129
138
  const repositoryPlugin = await getRepositoryPlugin({
130
139
  cwd,
131
140
  });
141
+ if (cli.flags.increment) {
142
+ const currentVersion = await repositoryPlugin.getCurrentVersion();
143
+ const currentSemverVersion = semver.parse(currentVersion);
144
+ const nextSemverVersion = currentSemverVersion?.inc(cli.flags.increment);
145
+ if (nextSemverVersion) {
146
+ input = nextSemverVersion.version;
147
+ }
148
+ }
132
149
  if (!semver.valid(input)) {
133
150
  const { nextVersion } = await promptForNextVersion({
134
151
  repositoryPlugin,
@@ -91,6 +91,12 @@ const productRepositories = [
91
91
  isPublic: false,
92
92
  type: 'NODE_JS',
93
93
  },
94
+ {
95
+ label: 'S3 Object Lambda',
96
+ repositoryName: 'product-s3-object-lambda',
97
+ isPublic: false,
98
+ type: 'NODE_JS',
99
+ },
94
100
  {
95
101
  label: 'Volunteers Client',
96
102
  repositoryName: 'product-volunteers-client',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oneblink/release-cli",
3
3
  "description": "Used internally by OneBlink to release repositories quickly and consistently",
4
- "version": "3.2.1",
4
+ "version": "3.3.0",
5
5
  "author": "OneBlink <developers@oneblink> (https://github.com/oneblink)",
6
6
  "bin": {
7
7
  "oneblink-release": "dist/bin.js"