version: '{branch}.{build}'
clone_depth: 1
skip_tags: true
image: Visual Studio 2019

environment:
  MSYSTEM: MINGW32

init:
  - git config --global core.autocrlf input

install:
  - set PATH=c:\msys64\mingw32\bin;c:\msys64\usr\bin;c:\msys64\bin;%PATH%
  - echo %PATH%
  - pacman -S --noconfirm --needed make ninja mingw-w64-i686-libusb mingw-w64-i686-sqlite3 mingw-w64-i686-zlib mingw-w64-i686-gcc zip

build_script:
  - make
  - zip -9 fluxengine.zip fluxengine.exe brother120tool.exe brother240tool.exe FluxEngine.cydsn/CortexM3/ARM_GCC_541/Release/FluxEngine.hex

artifacts:
  - path: fluxengine.zip
    name: fluxengine.zip

deploy:
  release: FluxEngine Windows client version $(APPVEYOR_BUILD_NUMBER)
  description: >
    This is an automatically built version of the FluxEngine Windows client
    which is generated whenever a significant checkin has happened. It's had
    no testing whatsoever.

    To use, download it, put it somewhere, and then run it from a cmd window
    or other command line shell.
  provider: GitHub
  auth_token:
    secure: dfJjj7fWCoDUz+Ni11OcNPB/U3TNJFwNA2AsL++ChFjniUsZLlC6SDWHiL/t4FZo
  artifact: fluxengine.zip
  draft: false
  prerelease: false
  on:
    branch: master

