]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/commitdiff
Inherit versioning info from environment if present
authorNicholas Tsirakis <niko.tsirakis@gmail.com>
Fri, 6 Nov 2020 20:48:44 +0000 (15:48 -0500)
committerPaul Durrant <pdurrant@amazon.com>
Tue, 10 Nov 2020 11:04:52 +0000 (11:04 +0000)
As the drivers stabilize and mature, there is an ever-growing
chance that other opensource virtualization projects will adopt
them. Allow external projects to inject their own versioning
into the drivers instead of hardcoding the latest winpv version.

Signed-off-by: Nicholas Tsirakis <tsirakisn@ainfosec.com>
Acked-by: Owen Smith <owen.smith@citrix.com>
build.ps1

index 77b1c6383c3dfa621bc6c6dc949c16fd2133c0d0..d29d84c20d75cb2ede9655e2dd3c9e33dc313971 100644 (file)
--- a/build.ps1
+++ b/build.ps1
@@ -79,9 +79,17 @@ if ([string]::IsNullOrEmpty($Env:BUILD_NUMBER)) {
        Set-Item -Path Env:BUILD_NUMBER -Value $BuildNum
 }
 
-Set-Item -Path Env:MAJOR_VERSION -Value '9'
-Set-Item -Path Env:MINOR_VERSION -Value '1'
-Set-Item -Path Env:MICRO_VERSION -Value '0'
+if ([string]::IsNullOrEmpty($Env:MAJOR_VERSION)) {
+       Set-Item -Path Env:MAJOR_VERSION -Value '9'
+}
+
+if ([string]::IsNullOrEmpty($Env:MINOR_VERSION)) {
+       Set-Item -Path Env:MINOR_VERSION -Value '1'
+}
+
+if ([string]::IsNullOrEmpty($Env:MICRO_VERSION)) {
+       Set-Item -Path Env:MICRO_VERSION -Value '0'
+}
 
 if ([string]::IsNullOrEmpty($Arch) -or $Arch -eq "x86" -or $Arch -eq "Win32") {
        Build "x86" $Type