variables:
  GIT_SUBMODULE_STRATEGY: recursive
  # input version for release (available only when pipeline is run manually)
  VERSION:
    value: ""
    description: "Set version release number for manuals"

# docker packages
image: registry.gitlab.com/islandoftex/images/texlive:TL2021-historic

NEMO manual:
  tags:
    - docker
  stage: build
  #when: manual
  script:
    - version=${CI_COMMIT_REF_NAME}
    - if [ "x${VERSION}" != "x" ] ; then version=${VERSION} ; fi
    - bash -x manual_build.sh -r ${version} -p NEMO
  artifacts:
    paths:
      - NEMO_manual.pdf
    expire_in: 15 mins

TOP manual:
  tags:
    - docker
  stage: build
  #when: manual
  script:
    - version=${CI_COMMIT_REF_NAME}
    - if [ "x${VERSION}" != "x" ] ; then version=${VERSION} ; fi
    - bash -x manual_build.sh -r ${version} -p TOP
  artifacts:
    paths:
      - TOP_manual.pdf
    expire_in: 15 mins

SI3 manual:
  tags:
    - docker
  stage: build
  #when: manual
  script:
    - version=${CI_COMMIT_REF_NAME}
    - if [ "x${VERSION}" != "x" ] ; then version=${VERSION} ; fi
    - bash -x manual_build.sh -r ${version} -p SI3
  artifacts:
    paths:
      - SI3_manual.pdf
    expire_in: 15 mins
