Skip to content

Commit

Permalink
Merge pull request #398 from contolini/fix/cli
Browse files Browse the repository at this point in the history
Fix handling of --next-version-from-metadata option
  • Loading branch information
Turbo87 authored Aug 7, 2021
2 parents 1980871 + 4145ae8 commit 4f6dff9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import Changelog from "./changelog";
import { load as loadConfig } from "./configuration";
import ConfigurationError from "./configuration-error";

const NEXT_VERSION_DEFAULT = "Unreleased";

export async function run() {
const yargs = require("yargs");

Expand Down Expand Up @@ -34,7 +36,7 @@ export async function run() {
"next-version": {
type: "string",
desc: "The name of the next version",
default: "Unreleased",
default: NEXT_VERSION_DEFAULT,
},
"next-version-from-metadata": {
type: "boolean",
Expand Down Expand Up @@ -64,7 +66,7 @@ export async function run() {
nextVersionFromMetadata: argv["next-version-from-metadata"],
});

if (argv["next-version"]) {
if (argv["next-version"] !== NEXT_VERSION_DEFAULT) {
config.nextVersion = argv["next-version"];
}

Expand Down

0 comments on commit 4f6dff9

Please sign in to comment.