pubm 0.0.2-5 → 0.0.2-6

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.
Files changed (2) hide show
  1. package/bin/cli.js +19 -13
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -6378,22 +6378,28 @@ cli.command("[version]").action(async (nextVersion, options2) => {
6378
6378
  tag: options2.tag
6379
6379
  };
6380
6380
  try {
6381
- if (!isCI3) {
6382
- await requiredMissingInformationTasks().run(context);
6383
- } else {
6384
- const git = new Git();
6385
- const latestVersion = (await git.latestTag())?.slice(1);
6386
- if (!latestVersion) {
6387
- throw new Error(
6388
- "Cannot find the latest tag. Please ensure tags exist in the repository."
6389
- );
6390
- }
6391
- if (!valid(latestVersion)) {
6381
+ if (isCI3) {
6382
+ if (options2.publishOnly) {
6383
+ const git = new Git();
6384
+ const latestVersion = (await git.latestTag())?.slice(1);
6385
+ if (!latestVersion) {
6386
+ throw new Error(
6387
+ "Cannot find the latest tag. Please ensure tags exist in the repository."
6388
+ );
6389
+ }
6390
+ if (!valid(latestVersion)) {
6391
+ throw new Error(
6392
+ "Cannot parse the latest tag to a valid SemVer version. Please check the tag format."
6393
+ );
6394
+ }
6395
+ context.version = latestVersion;
6396
+ } else {
6392
6397
  throw new Error(
6393
- "Cannot parse the latest tag to a valid SemVer version. Please check the tag format."
6398
+ "Version must be set in the CI environment. Please define the version before proceeding."
6394
6399
  );
6395
6400
  }
6396
- context.version = latestVersion;
6401
+ } else {
6402
+ await requiredMissingInformationTasks().run(context);
6397
6403
  }
6398
6404
  await pubm(
6399
6405
  resolveCliOptions({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pubm",
3
- "version": "0.0.2-5",
3
+ "version": "0.0.2-6",
4
4
  "engines": {
5
5
  "node": ">=18",
6
6
  "git": ">=2.11.0"