Skip to content

Commit

Permalink
Merge pull request #664 from crs-k/semver-clean-up
Browse files Browse the repository at this point in the history
semver clean up
  • Loading branch information
crs-k authored Apr 6, 2024
2 parents fc21da3 + a33e52d commit b232aaf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
9 changes: 6 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions src/functions/get-next-release-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ export async function getNextReleaseType(previousReleaseType: string): Promise<s
let nextReleaseType = ''

try {
if (previousReleaseType === 'production') {
if (releaseStrategy === 'single') {
nextReleaseType = 'production'
} else if (previousReleaseType === 'production') {
if (releaseStrategy === 'triple') {
nextReleaseType = 'alpha'
} else if (releaseStrategy === 'double') {
Expand All @@ -20,9 +22,9 @@ export async function getNextReleaseType(previousReleaseType: string): Promise<s
nextReleaseType = 'production'
}

assert(nextReleaseType, 'previous release type cannot be empty')
assert(nextReleaseType, 'next release type cannot be empty')
} catch (err) {
core.info('Failed to find previous release type.')
core.info('Failed to find next release type.')
nextReleaseType = ''
}
const data = nextReleaseType
Expand Down

0 comments on commit b232aaf

Please sign in to comment.