File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# stop on first error
22$ErrorActionPreference = " Stop"
33
4- $ARCH = " Windows"
5- $VENV = " venv-" + $ARCH
6-
7- # cleanup
8- Remove-Item - Recurse - Force - ErrorAction SilentlyContinue build
9- Remove-Item - Recurse - Force - ErrorAction SilentlyContinue dist
10- Remove-Item - Recurse - Force - ErrorAction SilentlyContinue divio_cli.egg- info
11- Remove-Item - Recurse - Force - ErrorAction SilentlyContinue $VENV
12-
134# create new venv
14- C:\Python27\Scripts\pip.exe install -- upgrade pip
15- C:\Python27\Scripts\pip.exe install virtualenv
16- C:\Python27\Scripts\virtualenv.exe $VENV
5+ python - m pip install -- upgrade pip
6+ pip install virtualenv
7+ virtualenv venv
8+ .\venv\Scripts\activate
179
1810# pip and pyinstaller generate lots of warnings, so we need to ignore them
1911$ErrorActionPreference = " Continue"
2012
2113# install build requirements
22- Invoke-Expression " .\ $VENV \Scripts\ pip.exe install --allow-external pyinstaller -r requirements.txt -r requirements-windows.txt -r requirements-build.txt"
23- Invoke-Expression " .\ $VENV \Scripts\ pip.exe install cryptography"
14+ pip install - r requirements.txt - r requirements- windows.txt - r requirements- build.txt
15+ pip install cryptography
2416
2517# install divio-cli
26- Invoke-Expression " .\ $VENV \Scripts\ pip.exe install -e ."
18+ pip install - e .
2719
2820# prepare out folder
2921md - Force binary
3022
3123# package app
32- Invoke-Expression " .\ $VENV \Scripts\ pyinstaller.exe -F -y scripts\entrypoint.py -n divio-$ARCH .exe --hidden-import=_cffi_backend --distpath=binary"
24+ pyinstaller.exe -F - y scripts\entrypoint.py - n divio-Windows .exe -- hidden - import= _cffi_backend -- distpath= binary
3325
3426$ErrorActionPreference = " Stop"
3527
36- # run check
37- Invoke-Expression " .\binary\divio-$ARCH version"
28+ # run check against newly built binary
29+ .\binary\divio- Windows version
You can’t perform that action at this time.
0 commit comments