From b35bd056d5389cf796279ef1b2676783c6036a81 Mon Sep 17 00:00:00 2001 From: TrainDoctor Date: Sun, 4 Sep 2022 20:11:06 -0700 Subject: Work on bump logic --- .github/workflows/build.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9eca53e8..5f423117 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -136,9 +136,14 @@ jobs: echo "VERS: $VERSION" if [[ "$VERSION" =~ "-pre" ]]; then OUT=$(semver bump release "$VERSION") + if [[ "${{github.event.inputs.bump}}" != "none" ]]; then + OUT=$(semver bump ${{github.event.inputs.bump}} "$OUT") + fi elif [[ ! "$VERSION" =~ "-pre" ]]; then if [[ "${{github.event.inputs.bump}}" != "none" ]]; then OUT=$(semver bump ${{github.event.inputs.bump}} "$VERSION") + else + OUT=$(semver bump patch "$VERSION") fi fi echo "OUT: v$OUT" @@ -195,12 +200,10 @@ jobs: export VERSION=${{ steps.latest_release.outputs.release }} echo "VERS: $VERSION" if [[ ! "$VERSION" =~ "-pre" ]]; then - OUT=$(semver bump minor "$VERSION") OUT="$OUT-pre" - elif [[ "$VERSION" =~ "-pre" ]]; then - if [[ "${{github.event.inputs.bump}}" != "none" ]]; then - OUT=$(semver bump ${{github.event.inputs.bump}} "$OUT") - fi + fi + if [[ "${{github.event.inputs.bump}}" != "none" ]]; then + OUT=$(semver bump ${{github.event.inputs.bump}} "$VERSION") fi OUT=$(semver bump prerel "$OUT") echo "OUT: v$OUT" -- cgit v1.2.3