Skip to content
Merged
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
2 changes: 1 addition & 1 deletion brancheetos.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function main() {

program
.name('brancheetos')
.version('1.4.0')
.version('1.5.0')
.description(
'Automate your release pull requests. Enjoy your brancheetos 🌶️🧀',
)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "git-brancheetos",
"version": "1.4.0",
"version": "1.5.0",
"description": "CLI tool to make your release pull requests consistent. Enjoy your brancheetos 🌶️🧀",
"keywords": [
"git",
Expand Down
5 changes: 3 additions & 2 deletions src/config/get-version-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function getYearMajorMinorOptions({ latestVersion }) {
let [year, major, minor, patch] = version.replace('v', '').split('.')

if (!year || !major || !minor) {
return [`${prefix}${currentYear}.1.1`]
return [`${prefix}${currentYear}.1.0`, `${prefix}${currentYear}.1.1`]
}

year = Number(year)
Expand All @@ -51,12 +51,13 @@ function getYearMajorMinorOptions({ latestVersion }) {
patch = patch ? Number(patch) : 0

if (currentYear !== year) {
return [`${prefix}${currentYear}.1.1`]
return [`${prefix}${currentYear}.1.0`, `${prefix}${currentYear}.1.1`]
}

return [
`${prefix}${year}.${major}.${minor}.${patch + 1}`,
`${prefix}${year}.${major}.${minor + 1}`,
`${prefix}${year}.${major + 1}.0`,
`${prefix}${year}.${major + 1}.1`,
]
}