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

Enabling no prefix tag #54

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [1.13.0] - 2021-02-10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be added by the releasy when it bumps the version

Suggested change
## [1.13.0] - 2021-02-10

### Added
- `--no-prefix` option to the ignore the prefix "v" for version.

## [1.12.0] - 2020-11-04
### Added
- `display-name` option to the release message.
Expand Down
1 change: 1 addition & 0 deletions bin/releasy.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ program
)
.option('-s, --silent', 'Dont ask for confirmation', false)
.option('-q, --quiet', "Don't write messages to console", false)
.option('--no-prefix', 'Ignore version prefix', false)
philcvlcnt marked this conversation as resolved.
Show resolved Hide resolved
.parse(args)

for (let [key, value] of Object.entries(optionsFile)) {
Expand Down
10 changes: 9 additions & 1 deletion lib/releasy.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ module.exports = function (opts) {
const year = dateArray[2]

// Pachamama v2 requires that version tags start with a 'v' character.
config.tagName = `v${config.newVersion}`

let prefix = 'v'

if (!opts.prefix) {
prefix = ''
}

config.tagName = `${prefix}${config.newVersion}`

if (opts.displayName) {
// TODO: Validade with @reliability if the pachamama accepts this new tag structure.
config.tagName = `${versionProvider.readName()}@${config.newVersion}`
Expand Down