Skip to content

Commit 221ee59

Browse files
authored
Merge pull request #2 from markusobi/artifact-version-in-name
testing build/version dispatching for artifact name
2 parents c31f353 + a9d1874 commit 221ee59

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

appveyor.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,31 @@ environment:
1212

1313
install:
1414
- set PATH=%PYTHON%;%PYTHON%/Scripts;%PATH%
15-
- python -VV
15+
- ps: >-
16+
If ($env:APPVEYOR_REPO_TAG -eq "true")
17+
{
18+
$env:BUILD_NUMBER_OR_TAG_NAME = $env:APPVEYOR_REPO_TAG_NAME
19+
}
20+
Else
21+
{
22+
$env:BUILD_NUMBER_OR_TAG_NAME = "$env:APPVEYOR_BUILD_NUMBER.$env:APPVEYOR_REPO_COMMIT"
23+
}
24+
- set WINDOWS_ZIP_FILENAME=hello_world-%BUILD_NUMBER_OR_TAG_NAME%-windows-x86.zip
25+
- echo windows artifact zip filename is %WINDOWS_ZIP_FILENAME%
1626
- python -m pip install pyinstaller
1727

1828
# run a custom scripts instead of automatic MSBuild
1929
build_script:
2030
- mkdir build
2131
- cd build
2232
- python -m PyInstaller ../hello_world.py
23-
- 7z a hello_world-windows-x86.zip ./dist/hello_world/
33+
- 7z a %WINDOWS_ZIP_FILENAME% ./dist/hello_world/
2434

2535
artifacts:
2636
- path: hello_world.py
2737
name: python_script
2838

29-
- path: build/hello_world-windows-x86.zip
39+
- path: build/$(WINDOWS_ZIP_FILENAME)
3040
name: windows_executable
3141

3242
deploy:

0 commit comments

Comments
 (0)