mirror of
https://github.com/lukaszraczylo/semver-generator.git
synced 2026-06-05 22:49:25 +00:00
Add debug mode parameter.
This commit is contained in:
+16
-13
@@ -1,36 +1,39 @@
|
||||
# action.yml
|
||||
name: 'Semantic Version Generator'
|
||||
description: 'Automagic semantic version generator'
|
||||
name: "Semantic Version Generator"
|
||||
description: "Automagic semantic version generator"
|
||||
author: Lukasz Raczylo
|
||||
branding:
|
||||
icon: chevron-right
|
||||
color: gray-dark
|
||||
inputs:
|
||||
config_file:
|
||||
description: 'Configuration file'
|
||||
description: "Configuration file"
|
||||
required: false
|
||||
repository_url:
|
||||
description: 'Repository URL'
|
||||
description: "Repository URL"
|
||||
required: false
|
||||
default: 'https://github.com/lukaszraczylo/simple-gql-client'
|
||||
default: "https://github.com/lukaszraczylo/simple-gql-client"
|
||||
repository_local:
|
||||
description: 'Use already cloned repository in current directory'
|
||||
description: "Use already cloned repository in current directory"
|
||||
required: false
|
||||
github_token:
|
||||
description: 'GitHub Personal Access Token OR password'
|
||||
description: "GitHub Personal Access Token OR password"
|
||||
required: false
|
||||
github_username:
|
||||
description: 'GitHub or other git hosting provider username'
|
||||
description: "GitHub or other git hosting provider username"
|
||||
required: false
|
||||
strict:
|
||||
description: 'Strict mode'
|
||||
description: "Strict mode"
|
||||
required: false
|
||||
existing:
|
||||
description: 'Respect existing tags'
|
||||
description: "Respect existing tags"
|
||||
required: false
|
||||
debugmode:
|
||||
description: "Debug mode"
|
||||
required: false
|
||||
outputs:
|
||||
semantic_version:
|
||||
description: 'Calculated semantic version'
|
||||
description: "Calculated semantic version"
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'docker://ghcr.io/lukaszraczylo/semver-generator:latest'
|
||||
using: "docker"
|
||||
image: "docker://ghcr.io/lukaszraczylo/semver-generator:latest"
|
||||
|
||||
@@ -5,6 +5,7 @@ FLAGS="$SEMVER_RAW_FLAGS"
|
||||
|
||||
if [[ -z "$INPUT_CONFIG_FILE" ]]; then
|
||||
echo "Set the configuration file path."
|
||||
exit 1
|
||||
else
|
||||
FLAGS="${FLAGS} -c $INPUT_CONFIG_FILE"
|
||||
fi
|
||||
@@ -34,6 +35,10 @@ if [[ ! -z "$INPUT_EXISTING" ]]; then
|
||||
FLAGS="${FLAGS} -e"
|
||||
fi
|
||||
|
||||
if [[ ! =z "$INPUT_DEBUGMODE"]]; then
|
||||
FLAGS="${FLAGS} --debug"
|
||||
fi
|
||||
|
||||
if [[ "${FLAGS}" == "" && "$*" == "" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
@@ -46,6 +51,19 @@ if [[ ! -z "$INPUT_GITHUB_USERNAME" ]]; then
|
||||
export GITHUB_USERNAME=$INPUT_GITHUB_USERNAME
|
||||
fi
|
||||
|
||||
if [[ ! -z "$INPUT_DEBUGMODE" ]]; then
|
||||
echo "DEBUG MODE ENABLED"
|
||||
echo "----"
|
||||
ls -lA
|
||||
echo "----"
|
||||
pwd
|
||||
echo "----"
|
||||
echo "FLAGS: $FLAGS"
|
||||
echo "----"
|
||||
/go/src/app/semver-gen generate $FLAGS $*
|
||||
echo "----"
|
||||
fi
|
||||
|
||||
OUT_SEMVER_GEN=$(/go/src/app/semver-gen generate $FLAGS $*)
|
||||
[ $? -eq 0 ] || exit 1
|
||||
CLEAN_SEMVER=$(echo $OUT_SEMVER_GEN | sed -e 's|SEMVER ||g')
|
||||
|
||||
Reference in New Issue
Block a user