return default value for out to ""

This commit is contained in:
TrainDoctor
2022-09-04 21:03:45 -07:00
parent 1892403044
commit d1887870f5

View File

@@ -213,18 +213,18 @@ jobs:
run: |
export VERSION=${{ steps.latest_release.outputs.release }}
echo "VERS: $VERSION"
OUT="notsemver"
OUT=""
if [[ ! ${{ github.event.inputs.bump }} == "none" ]]; then
printf "bumping by release then by selected\n"
OUT=$(semver bump release "$VERSION")
printf "OUT: ${OUT}\n"
OUT=$(semver bump ${{github.event.inputs.bump}} "$OUT")
printf "OUT: ${OUT}\n"
fi
if [[ ! "$OUT" =~ "-pre" ]]; then
printf "appending -pre to new prerelease\n"
OUT="${OUT}-pre"
printf "OUT: ${OUT}\n"
if [[ ! "$OUT" =~ "-pre" ]]; then
printf "appending -pre to new prerelease\n"
OUT="${OUT}-pre"
printf "OUT: ${OUT}\n"
fi
fi
if [[ "$OUT" == "" ]]; then
OUT=$(semver bump prerel "$VERSION")