Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# The build version is derived from the repo here, which overrides the
# hard-coded "Build version format" in the AppVeyor project settings. The
# {build} placeholder is replaced in before_build with the version read from
# the VERSION file plus the short commit hash (see below).
version: '{build}'

environment:
matrix:
- BUILD_ENV: msbuild
Expand All @@ -6,6 +12,15 @@ environment:
arch: Win32
- BUILD_ENV: cygwin

# Derive the build version from the repo: <VERSION>-<short commit>.<build number>,
# e.g. 0.16.0-1a2b3c4.42. The build number keeps it unique even if the same
# commit is built more than once.
before_build:
- ps: |
$base = (Get-Content -Raw "$env:APPVEYOR_BUILD_FOLDER/VERSION").Trim()
$short = git rev-parse --short HEAD
Update-AppveyorBuild -Version "$base-$short.$env:APPVEYOR_BUILD_NUMBER"

for:
-
matrix:
Expand Down
Loading