Skip to content

Commit

Permalink
Merge pull request #138 from zowe-actions/fix/undefined-prerelease-ve…
Browse files Browse the repository at this point in the history
…rsion

Don't update prerelease version if new-version input is set
  • Loading branch information
t1m0thyj committed Mar 14, 2024
2 parents 611d26f + 075388e commit 7d01b63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions dist/core.js

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

5 changes: 3 additions & 2 deletions packages/core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ export async function loadPlugins(context: IContext): Promise<IPluginsLoaded> {
* @param context Global context object for Octorelease
*/
export async function verifyConditions(context: IContext): Promise<void> {
context.version.new = Inputs.newVersion || context.version.new;
if (context.version.prerelease != null) {
if (Inputs.newVersion != null) {
context.version.new = Inputs.newVersion;
} else if (context.version.prerelease != null) {
context.version.new = `${context.version.new.split("-")[0]}-${context.version.prerelease}`;
}

Expand Down

0 comments on commit 7d01b63

Please sign in to comment.