Skip to content

Argument --releaseAs [1.1.0] is ignored if --skip.bump is also used #130

Open
@aheater18

Description

@aheater18

Describe the bug
Running commit-and-tag-version with the option to skip the bump step uses the current version in package.json instead of using the version specified with the argument releaseAs.

Current behavior
Steps following bump (changelog, commit, tag) run with the current version in package.json.

Expected behavior
Other steps (changelog, commit, tag) should run with the version specified with releaseAs.

Environment

  • commit-and-tag-version version(s): 12.2.0
  • Node/npm version: Node 20.5.0
  • OS: Windows 10

Possible Solution

In bump.js, the logic for determining the newVersion from releaseAs (I think lines 46-62) should be moved up to line 35, and the check for args.skip.bump should be moved to occur right after that, returning the releaseAs version if it exists.

Additional context
Add any other context about the problem here. Or a screenshot if applicable

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions