mirror of
https://github.com/lukaszraczylo/semver-generator.git
synced 2026-06-28 03:03:06 +00:00
Further modifications to the action part #2
This commit is contained in:
+1
-1
@@ -21,4 +21,4 @@ outputs:
|
|||||||
description: 'Calculated semantic version'
|
description: 'Calculated semantic version'
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: docker://ghcr.io/lukaszraczylo/semver-generator:latest
|
image: Dockerfile
|
||||||
|
|||||||
+4
-2
@@ -5,7 +5,6 @@ FLAGS=""
|
|||||||
|
|
||||||
if [[ -z "$INPUT_CONFIG_FILE" ]]; then
|
if [[ -z "$INPUT_CONFIG_FILE" ]]; then
|
||||||
echo "Set the configuration file path."
|
echo "Set the configuration file path."
|
||||||
exit 1
|
|
||||||
else
|
else
|
||||||
FLAGS="${FLAGS} -c $INPUT_CONFIG_FILE"
|
FLAGS="${FLAGS} -c $INPUT_CONFIG_FILE"
|
||||||
fi
|
fi
|
||||||
@@ -13,7 +12,6 @@ fi
|
|||||||
if [[ -z "$INPUT_REPOSITORY_URL" ]] && [[ -z "$INPUT_REPOSITORY_LOCAL" ]];
|
if [[ -z "$INPUT_REPOSITORY_URL" ]] && [[ -z "$INPUT_REPOSITORY_LOCAL" ]];
|
||||||
then
|
then
|
||||||
echo "You need to set either remote repository or repository local flags."
|
echo "You need to set either remote repository or repository local flags."
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z "$INPUT_REPOSITORY_URL" ]]; then
|
if [[ ! -z "$INPUT_REPOSITORY_URL" ]]; then
|
||||||
@@ -24,6 +22,10 @@ if [[ ! -z "$INPUT_REPOSITORY_LOCAL" ]]; then
|
|||||||
FLAGS="${FLAGS} -l"
|
FLAGS="${FLAGS} -l"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${FLAGS}" == "" && "$*" == "" ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
OUT_SEMVER_GEN=$(/go/src/app/semver-gen generate $FLAGS $*)
|
OUT_SEMVER_GEN=$(/go/src/app/semver-gen generate $FLAGS $*)
|
||||||
echo "::set-output name=semantic_version::$(echo $OUT_SEMVER_GEN | sed -e 's|SEMVER ||g')"
|
echo "::set-output name=semantic_version::$(echo $OUT_SEMVER_GEN | sed -e 's|SEMVER ||g')"
|
||||||
echo $OUT_SEMVER_GEN
|
echo $OUT_SEMVER_GEN
|
||||||
Reference in New Issue
Block a user