mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
f4ea5b81b1
Any kind of piping or echo creates a UCS-2 LE BOM, and dotenv can't handle this. https://gitlab.com/gitlab-org/gitlab/-/issues/212629#note_430278657 I've also added back in branch trigger so latest links still work
90 lines
2.3 KiB
YAML
90 lines
2.3 KiB
YAML
# yamllint disable rule:line-length
|
|
---
|
|
win-dev-build:
|
|
stage: dev-deployment
|
|
tags:
|
|
- win64
|
|
cache:
|
|
paths:
|
|
- .venv/
|
|
rules:
|
|
- if: "$CI_COMMIT_BRANCH == 'dev'"
|
|
environment:
|
|
name: development
|
|
script:
|
|
- |
|
|
$ErrorActionPreference = "Stop"
|
|
py -m venv .venv
|
|
.venv\Scripts\activate.ps1
|
|
pip install pyinstaller
|
|
pip install -r requirements.txt
|
|
- pyinstaller -F main.py
|
|
--distpath .
|
|
--icon app\frontend\static\assets\images\Crafty_4-0_Logo_square.ico
|
|
--name "crafty_commander"
|
|
--paths .venv\Lib\site-packages
|
|
--hidden-import cryptography
|
|
--hidden-import cffi
|
|
--hidden-import apscheduler
|
|
--collect-all tzlocal
|
|
--collect-all tzdata
|
|
--collect-all pytz
|
|
--collect-all six
|
|
|
|
# Download latest:
|
|
# | https://gitlab.com/crafty-controller/crafty-4/-/jobs/artifacts/dev/download?job=win-dev-build
|
|
artifacts:
|
|
name: "crafty-${CI_RUNNER_TAGS}-${CI_COMMIT_BRANCH}_${CI_COMMIT_SHORT_SHA}"
|
|
paths:
|
|
- app\
|
|
- .\crafty_commander.exe
|
|
exclude:
|
|
- app\classes\**\*
|
|
|
|
win-prod-build:
|
|
stage: prod-deployment
|
|
tags:
|
|
- win64
|
|
cache:
|
|
paths:
|
|
- .venv/
|
|
rules:
|
|
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
|
|
- if: $CI_COMMIT_TAG
|
|
environment:
|
|
name: production
|
|
script:
|
|
- |
|
|
$ErrorActionPreference = "Stop"
|
|
py -m venv .venv
|
|
.venv\Scripts\activate.ps1
|
|
pip install pyinstaller
|
|
pip install -r requirements.txt
|
|
- pyinstaller -F main.py
|
|
--distpath .
|
|
--icon app\frontend\static\assets\images\Crafty_4-0_Logo_square.ico
|
|
--name "crafty_commander"
|
|
--paths .venv\Lib\site-packages
|
|
--hidden-import cryptography
|
|
--hidden-import cffi
|
|
--hidden-import apscheduler
|
|
--collect-all tzlocal
|
|
--collect-all tzdata
|
|
--collect-all pytz
|
|
--collect-all six
|
|
after_script:
|
|
- Add-Content -Path job.env -Value "JOB_ID=$CI_JOB_ID"
|
|
|
|
# Download latest:
|
|
# | https://gitlab.com/crafty-controller/crafty-4/-/jobs/artifacts/master/download?job=win-prod-build
|
|
artifacts:
|
|
name: "crafty-${CI_RUNNER_TAGS}-${CI_COMMIT_BRANCH}_${CI_COMMIT_SHORT_SHA}"
|
|
paths:
|
|
- app\
|
|
- .\crafty_commander.exe
|
|
expire_in: never
|
|
exclude:
|
|
- app\classes\**\*
|
|
reports:
|
|
dotenv: job.env
|