mirror of
https://github.com/lukaszraczylo/semver-generator.git
synced 2026-06-05 22:49:25 +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'
|
||||
runs:
|
||||
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
|
||||
echo "Set the configuration file path."
|
||||
exit 1
|
||||
else
|
||||
FLAGS="${FLAGS} -c $INPUT_CONFIG_FILE"
|
||||
fi
|
||||
@@ -13,7 +12,6 @@ fi
|
||||
if [[ -z "$INPUT_REPOSITORY_URL" ]] && [[ -z "$INPUT_REPOSITORY_LOCAL" ]];
|
||||
then
|
||||
echo "You need to set either remote repository or repository local flags."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -z "$INPUT_REPOSITORY_URL" ]]; then
|
||||
@@ -24,6 +22,10 @@ if [[ ! -z "$INPUT_REPOSITORY_LOCAL" ]]; then
|
||||
FLAGS="${FLAGS} -l"
|
||||
fi
|
||||
|
||||
if [[ "${FLAGS}" == "" && "$*" == "" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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 $OUT_SEMVER_GEN
|
||||
Reference in New Issue
Block a user