From a2f0dc8eff2ae278a093981c2edbbc1b607cb46f Mon Sep 17 00:00:00 2001 From: lewa <lene.wasskog@nibio.no> Date: Mon, 4 Sep 2023 08:35:51 +0200 Subject: [PATCH] build: Make deploy job fail with exit code 1 if version is not SNAPSHOT --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 935c5d4..904a6cd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,7 +50,7 @@ deploy-snapshot: stage: deploy script: - export VERSION=$(./mvnw --batch-mode --no-transfer-progress --non-recursive help:evaluate -Dexpression=project.version | grep -v "\[.*") - - if ! [[ $VERSION =~ .*SNAPSHOT ]]; then exit 0; fi + - if ! [[ $VERSION =~ .*SNAPSHOT ]]; then exit 1; fi - ./mvnw $MAVEN_CLI_OPTS $MAVEN_OPTS deploy -DskipTests tags: - vips-java -- GitLab