Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of --next-version-from-metadata option #398

Merged
merged 2 commits into from
Aug 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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