stages:
  - build
  - test
  - package

build:
  stage: build
  script:
    - make
  artifacts:
    paths:
      - btsoot

test:
  stage: test
  script:
    - check-build make

dpkg:
  stage: package
  environment: Production
  script:
    - make
    - mkdir -p btsoot_$CI_BUILD_TAG/DEBIAN/
    - python3.6 package_deb_replace_version.py $CI_BUILD_TAG
    - mkdir -p btsoot_$CI_BUILD_TAG/usr/local/bin
    - mkdir -p btsoot_$CI_BUILD_TAG/etc/btsoot/scans
    - cp src/btsoot btsoot_$CI_BUILD_TAG/usr/local/bin/btsoot
    - dpkg-deb --build btsoot_$CI_BUILD_TAG
  artifacts:
    paths:
      - btsoot_$CI_BUILD_TAG.deb
  only:
    - tags

stages:
  - build
  - test
  - package

build:
  stage: build
  script:
    - make
  artifacts:
    paths:
      - btsoot

test:
  stage: test
  script:
    - scan-build make

dpkg:
  stage: package
  environment: Production
  script:
    - make
    - mkdir -p btsoot_$CI_BUILD_TAG/DEBIAN/
    - python3.6 package_deb_replace_version.py $CI_BUILD_TAG
    - mkdir -p btsoot_$CI_BUILD_TAG/usr/local/bin
    - mkdir -p btsoot_$CI_BUILD_TAG/etc/btsoot/scans
    - cp src/btsoot btsoot_$CI_BUILD_TAG/usr/local/bin/btsoot
    - dpkg-deb --build btsoot_$CI_BUILD_TAG
  artifacts:
    paths:
      - btsoot_$CI_BUILD_TAG.deb
  only:
    - tags

Fix command not found for scan build
Fix command not found for scan build
