Commit fa42b8d3 authored by Dimitrios Giannopoulos's avatar Dimitrios Giannopoulos
Browse files

added default app version

parent 6ddb3066
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -7,12 +7,16 @@ stages:

# Default configuration for all jobs
.default:
  variables:
    DEFAULT_VERSION: "1.2.0-SNAPSHOT"
  before_script:
    - |
      if [ "$CI_COMMIT_REF_NAME" = "main" ] && [ -n "$CI_COMMIT_TAG" ]; then
        export APP_VERSION=$CI_COMMIT_TAG
      elif [ "$CI_COMMIT_REF_NAME" = "develop" ]; then
        export APP_VERSION="develop"
      else
        export APP_VERSION=$DEFAULT_VERSION
      fi

# Configuration for jobs on protected branches