mirror of
https://github.com/matifali/update-coder-template.git
synced 2025-11-10 09:21:16 +08:00
make --message conditional
This commit is contained in:
parent
1f99dff337
commit
8be7894259
1 changed files with 7 additions and 1 deletions
|
|
@ -12,7 +12,13 @@ echo "CODER_TEMPLATE_ID: ${CODER_TEMPLATE_ID}"
|
||||||
echo "CODER_TEMPLATE_DIR: ${CODER_TEMPLATE_DIR}"
|
echo "CODER_TEMPLATE_DIR: ${CODER_TEMPLATE_DIR}"
|
||||||
|
|
||||||
# Construct push command
|
# Construct push command
|
||||||
push_command="coder templates push ${CODER_TEMPLATE_ID} --directory ./${CODER_TEMPLATE_DIR}" --message ${CODER_TEMPLATE_MESSAGE}
|
push_command="coder templates push ${CODER_TEMPLATE_ID} --directory ./${CODER_TEMPLATE_DIR}"
|
||||||
|
|
||||||
|
# Add message to the push command if specified
|
||||||
|
if [ -n "${CODER_TEMPLATE_MESSAGE}" ]; then
|
||||||
|
push_command+=" --message ${CODER_TEMPLATE_MESSAGE}"
|
||||||
|
fi
|
||||||
|
push_command+=" --message ${CODER_TEMPLATE_MESSAGE}"
|
||||||
|
|
||||||
# Append --create flag to the push command if CODER_TEMPLATE_CREATE is true
|
# Append --create flag to the push command if CODER_TEMPLATE_CREATE is true
|
||||||
if [ "${CODER_TEMPLATE_CREATE}" = "true" ]; then
|
if [ "${CODER_TEMPLATE_CREATE}" = "true" ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue