Skip to content

Commit

Permalink
update build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
gertd committed Oct 8, 2021
1 parent e77549a commit ab93ec5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

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

# validate if values are set
[ -z "${INPUT_SRC}" ] && echo "INPUT_SRC is not set exiting" && exit 2
[ -z "${INPUT_TAG}" ] && exit "INPUT_TAG is not set exiting" && exit 2
[ -z "${INPUT_REVISION}" ] && exit "INPUT_REVISION 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

# calculate paths relative to the workspace (GITHUB_WORKSPACE).
Expand Down Expand Up @@ -44,7 +42,6 @@ printf "\n"
echo "INPUT_SRC ${INPUT_SRC}"
echo "INPUT_TAG ${INPUT_TAG}"
echo "INPUT_REVISION ${INPUT_REVISION}"
echo "INPUT_SERVER ${INPUT_SERVER}"
echo "INPUT_VERBOSITY ${INPUT_VERBOSITY} (${VERBOSITY})"
echo "SRC_PATH ${SRC_PATH}"
printf "\n"
Expand All @@ -55,7 +52,7 @@ printf "\n"
e_code=0

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

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

0 comments on commit ab93ec5

Please sign in to comment.