workspace:
  base: /srv/app
  path: src/git.mowie.cc/konrad/Library

pipeline:
  clone:
    image: plugins/git
    depth: 50
    tags: true

  build-backend:
    image: webhippie/golang:edge
    pull: true
    group: build
    environment:
      TAGS: bindata sqlite
      GOPATH: /srv/app
    commands:
      - make clean
      - make lint
      - make fmt-check
      - make build
    when:
      event: [ push, tag, pull_request ]

  build-frontend:
    image: webhippie/nodejs:current
    pull: true
    group: build
    commands:
      - cd frontend/
      - npm install
      - npm run build
    when:
      event: [ push, tag, pull_request ]

#  static:
#    image: karalabe/xgo-latest:latest
#    pull: true
#    environment:
#      TAGS: bindata sqlite
#      GOPATH: /srv/app
#    commands:
#      - make release
#    when:
#      event: [ push, tag ]