}
if ([string]::IsNullOrEmpty($Env:VENDOR_NAME)) {
- Set-Item -Path Env:VENDOR_NAME -Value 'Xen Project'
+ Set-Item -Path Env:VENDOR_NAME -Value 'Xen Project'
}
if ([string]::IsNullOrEmpty($Env:VENDOR_PREFIX)) {
- Set-Item -Path Env:VENDOR_PREFIX -Value 'XP'
+ Set-Item -Path Env:VENDOR_PREFIX -Value 'XP'
}
if ([string]::IsNullOrEmpty($Env:PRODUCT_NAME)) {
- Set-Item -Path Env:PRODUCT_NAME -Value 'Xen'
+ Set-Item -Path Env:PRODUCT_NAME -Value 'Xen'
+}
+
+if ([string]::IsNullOrEmpty($Env:BUILD_NUMBER)) {
+ if (Test-Path ".build_number") {
+ $BuildNum = Get-Content -Path ".build_number"
+ Set-Content -Path ".build_number" -Value ([int]$BuildNum + 1)
+ } else {
+ $BuildNum = '0'
+ Set-Content -Path ".build_number" -Value '1'
+ }
+ Set-Item -Path Env:BUILD_NUMBER -Value $BuildNum
}
Set-Item -Path Env:MAJOR_VERSION -Value '9'
if ($Sdv) {
SdvBuild
}
-
-if (Test-Path ".build_number") {
- $TheBuildNum = Get-Content -Path ".build_number"
- Set-Content -Path ".build_number" -Value ([int]$TheBuildNum + 1)
-} else {
- Set-Content -Path ".build_number" -Value "1"
-}
Set-Content -Path ".revision" -Value $GitRevision
}
-# if ".build_number" doesnt exist, BUILD_NUMBER = 0
-# since this can called by the vcxproj, do not autoincrement the build number
-# as this will mean x64 and Win32 builds have different numbers!
-if (Test-Path ".build_number") {
- $TheBuildNum = Get-Content -Path ".build_number"
-} else {
- Set-Content -Path ".build_number" -Value "0"
-}
-if (-not $TheBuildNum) {
- $TheBuildNum = '0'
-}
-
# [ordered] makes output easier to parse by humans
$Replacements = [ordered]@{
# values determined from the build environment
'MAJOR_VERSION' = $Env:MAJOR_VERSION;
'MINOR_VERSION' = $Env:MINOR_VERSION;
'MICRO_VERSION' = $Env:MICRO_VERSION;
+ 'BUILD_NUMBER' = $Env:BUILD_NUMBER;
# generated values
- 'BUILD_NUMBER' = $TheBuildNum;
'GIT_REVISION' = $GitRevision;
'INF_DATE' = $InfDate;
<PackageFiles Include="$(OutDir)\$(ProjectName)\*" />
</ItemGroup>
<Target Name="Archive" AfterTargets="TestSign">
- <Exec Command="del /f /q $(ArchiveDir)" />
<Copy
SourceFiles="@(PackageFiles)"
DestinationFiles="@(PackageFiles->'$(ArchiveDir)\%(FileName)%(Extension)')"
<PackageFiles Include="$(OutDir)\$(ProjectName)\*" />
</ItemGroup>
<Target Name="Archive" AfterTargets="TestSign">
- <Exec Command="del /f /q $(ArchiveDir)" />
<Copy
SourceFiles="@(PackageFiles)"
DestinationFiles="@(PackageFiles->'$(ArchiveDir)\%(FileName)%(Extension)')"