Commit 0eb9ef66 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

checks expath-pkg version before releasing

parent 9db8a83d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -6,6 +6,12 @@ release_job:
  image: registry.gitlab.com/gitlab-org/release-cli:latest
  rules:
    - if: $CI_COMMIT_TAG                 # Run this job when a tag is created
  before_script:
    - |
      EXPATH_VERSION=$(grep -P -o -e '(?<=version=").*?(?=")' src/resources/expath-pkg.xml)
      if [ ${CI_COMMIT_TAG} != ${EXPATH_VERSION} ] 
      then echo 'fail : Bad expath-pkg.xml version : ${EXPATH_VERSION} instead of ${CI_COMMIT_TAG}' && exit 1
      else echo 'Version ok'
  script:
    - echo "running release_job"
  release:                               # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties