.gitlab-ci.yml 536 Bytes
Newer Older
Pietro Saccardi's avatar
Pietro Saccardi committed
1 2 3 4 5
stages:
  - build

build:less:
  stage: build
6
  image: node:8.0.0-alpine
Pietro Saccardi's avatar
Pietro Saccardi committed
7 8 9 10
  variables:
    PLUGIN_NAME: MittelTheme
    LESS_SRC: Template/css/app.less
    LESS_OUTPUT: Template/css/main.css
11 12 13
  before_script:
    - yarn global add less
    - yarn global add less-plugin-clean-css
Pietro Saccardi's avatar
Pietro Saccardi committed
14 15 16 17 18 19 20
  script:
    - /usr/local/bin/lessc "${LESS_SRC}" > "${LESS_OUTPUT}"
    - git archive HEAD --prefix="${PLUGIN_NAME}/" --format=zip -o "${PLUGIN_NAME}.zip"
    - zip -d "${PLUGIN_NAME}.zip" "${LESS_SRC}"
  artifacts:
    paths:
      - "${PLUGIN_NAME}.zip"