Skip to content

Commit

Permalink
push.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
gertd committed Oct 8, 2021
1 parent ab93ec5 commit 0248963
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scripts/push.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/usr/bin/env bash

# set defaults when not set
[ -z "${INPUT_SERVER}" ] && INPUT_SERVER="opcr.io"
[ -z "${INPUT_VERBOSITY}" ] && INPUT_VERBOSITY="error"

# validate if values are set
[ -z "${INPUT_TAG}" ] && echo "INPUT_TAG is not set exiting" && exit 2
[ -z "${INPUT_SERVER}" ] && exit "INPUT_SERVER is not set exiting" && exit 2
[ -z "${INPUT_VERBOSITY}" ] && exit "INPUT_VERBOSITY is not set exiting" && exit 2

VERBOSITY=0
Expand All @@ -30,7 +28,6 @@ echo "POLICY-PUSH $(/app/policy version | sed 's/Policy CLI.//g')"
printf "\n"
printf "\n"
echo "INPUT_TAG ${INPUT_TAG}"
echo "INPUT_SERVER ${INPUT_SERVER}"
echo "INPUT_VERBOSITY ${INPUT_VERBOSITY} (${VERBOSITY})"
printf "\n"

Expand All @@ -40,7 +37,7 @@ printf "\n"
e_code=0

# construct commandline arguments
CMD="/app/policy push ${INPUT_TAG} --server=${INPUT_SERVER} --verbosity=${VERBOSITY}"
CMD="/app/policy push ${INPUT_TAG} --verbosity=${VERBOSITY}"

# execute command
eval "$CMD" || e_code=1
Expand Down

0 comments on commit 0248963

Please sign in to comment.