From d09d09e526363c95a84b9089f02c9c216eb7d67d Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Fri, 14 Jul 2023 10:22:06 +0200 Subject: [PATCH] build: Group shell commands to avoid unintended exit --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index d73ee95..c394c19 100644 --- a/.drone.yml +++ b/.drone.yml @@ -48,7 +48,7 @@ steps: pull: always commands: - | - export IMAGE_TAG=$(cat .version 2> /dev/null) && [ -n "$IMAGE_TAG" ] || echo 'No release tag - exiting'; exit 0 + export IMAGE_TAG=$(cat .version 2> /dev/null) && [ -n "$IMAGE_TAG" ] || (echo 'No release tag - exiting'; exit 0) - | wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq chmod +x /bin/jq @@ -73,7 +73,7 @@ steps: pull: always commands: - | - export IMAGE_TAG=$(cat .version 2> /dev/null) && [ -n "$IMAGE_TAG" ] || echo 'No release tag - exiting'; exit 0 + export IMAGE_TAG=$(cat .version 2> /dev/null) && [ -n "$IMAGE_TAG" ] || (echo 'No release tag - exiting'; exit 0) - | wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq chmod +x /bin/jq @@ -98,7 +98,7 @@ steps: pull: always commands: - | - export CHART_VERSION=$(cat .version 2> /dev/null) && [ -n "$CHART_VERSION" ] || echo 'No release tag - exiting'; exit 0 + export CHART_VERSION=$(cat .version 2> /dev/null) && [ -n "$CHART_VERSION" ] || (echo 'No release tag - exiting'; exit 0) sed -i 's/{{ chart_version }}/'$CHART_VERSION'/g' charts/json-server/Chart.yaml sed -i 's/tag: latest/tag: '$CHART_VERSION'/g' charts/json-server/values.yaml - | @@ -129,7 +129,7 @@ steps: pull: always commands: - | - export VALID_TAG=$(cat .version 2> /dev/null) && [ -n "$VALID_TAG" ] || echo 'No release tag - exiting'; exit 0 + export VALID_TAG=$(cat .version 2> /dev/null) && [ -n "$VALID_TAG" ] || (echo 'No release tag - exiting'; exit 0) - | apt-get update - |