History

Modified build scripts to provide a cleaner method to override build variables locally.

gsfbuildbot committed 9 years ago

Commit 98be0e81 parent b587cb97 files · +30 −212Browse files

Showing the changes to Build/Scripts (7 of 7 files). Show all

Unified · Split

7 files
  1. Build/Scripts/BuildBeta.bat +5 −7
  2. Build/Scripts/BuildBetaNoHelp.bat +0 −41
  3. Build/Scripts/BuildNightly.bat +4 −5
  4. Build/Scripts/BuildNightlyNoHelp.bat +0 −41
  5. Build/Scripts/BuildRelease.bat +13 −4
  6. Build/Scripts/CommonBuild.bat +0 −111
  7. Build/Scripts/MasterBuild.buildproj +8 −3
Build/Scripts/BuildBeta.bat+5−7
@@ -27,13 +27,11 @@ · 26 unmodified lines
27::27::
28::*******************************************************************************************************28::*******************************************************************************************************
29 29
30echo off30@ECHO OFF
31 31
32SetLocal EnableDelayedExpansion32SetLocal
33 33
34ECHO BuildBeta: CALL CommonBuild.bat %*34IF NOT "%1" == "" SET logflag=/l:FileLogger,Microsoft.Build.Engine;logfile=%1
35CALL CommonBuild.bat %*
36 35
37ECHO BuildBeta: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe GridSolutionsFramework.buildproj /p:BuildDeployFolder=%deploy%;NugetApiKey=%api_key%;NugetPackagesFolder=%package%;ForceBuild=true /l:FileLogger,Microsoft.Build.Engine;logfile=%logger%36ECHO BuildBeta: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe GridSolutionsFramework.buildproj /p:ForceBuild=true %logflag%
38"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" GridSolutionsFramework.buildproj /p:BuildDeployFolder=%deploy%;NugetApiKey=%api_key%;NugetPackagesFolder=%package%;ForceBuild=true /l:FileLogger,Microsoft.Build.Engine;logfile=%logger% 37"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" GridSolutionsFramework.buildproj /p:ForceBuild=true %logFlag%
39endlocal
Build/Scripts/BuildBetaNoHelp.bat+0−41
@@ -1,41 +0,0 @@
1::*******************************************************************************************************
2:: BuildBetaNoHelp.bat - Gbtc
3::
4:: Copyright � 2013, Grid Protection Alliance. All Rights Reserved.
5::
6:: Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
7:: the NOTICE file distributed with this work for additional information regarding copyright ownership.
8:: The GPA licenses this file to you under the Eclipse Public License -v 1.0 (the "License"); you may
9:: not use this file except in compliance with the License. You may obtain a copy of the License at:
10::
11:: http://www.opensource.org/licenses/eclipse-1.0.php
12::
13:: Unless agreed to in writing, the subject software distributed under the License is distributed on an
14:: "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
15:: License for the specific language governing permissions and limitations.
16::
17:: Code Modification History:
18:: -----------------------------------------------------------------------------------------------------
19:: 10/05/2009 - Pinal C. Patel
20:: Generated original version of source code.
21:: 10/20/2009 - Pinal C. Patel
22:: Modified to force a build and suppress archives from being published to public locations.
23:: 10/03/2010 - Pinal C. Patel
24:: Updated to use MSBuild 4.0.
25:: 08/25/2014 - Gavin E. Holden
26:: Modified to call CommonBuild.bat
27:: 08/14/2015 - Stephen C. Wills
28:: Adapted from BuildBeta.bat.
29::
30::*******************************************************************************************************
31
32echo off
33
34SetLocal EnableDelayedExpansion
35
36ECHO BuildBetaNoHelp: CALL CommonBuild.bat %*
37CALL CommonBuild.bat %*
38
39ECHO BuildBetaNoHelp: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe GridSolutionsFramework.buildproj /p:BuildDeployFolder=%deploy%;NugetApiKey=%api_key%;NugetPackagesFolder=%package%;ForceBuild=true;SkipHelpFiles=true /l:FileLogger,Microsoft.Build.Engine;logfile=%logger%
40"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" GridSolutionsFramework.buildproj /p:BuildDeployFolder=%deploy%;NugetApiKey=%api_key%;NugetPackagesFolder=%package%;ForceBuild=true;SkipHelpFiles=true /l:FileLogger,Microsoft.Build.Engine;logfile=%logger%
41endlocal
Build/Scripts/BuildNightly.bat+4−5
@@ -31,11 +31,10 @@ · 30 unmodified lines
31 31
32@ECHO OFF32@ECHO OFF
33 33
34SetLocal EnableDelayedExpansion34SetLocal
35 35
36ECHO BuildNightly: CALL CommonBuild.bat %*36IF NOT "%1" == "" SET logflag=/l:FileLogger,Microsoft.Build.Engine;logfile=%1
37CALL CommonBuild.bat %*
38 37
39ECHO BuildNightly: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe GridSolutionsFramework.buildproj /p:BuildDeployFolder=%deploy%;NugetApiKey=%api_key%;NugetPackagesFolder=%package%;ForceBuild=false /l:FileLogger,Microsoft.Build.Engine;logfile=%logger%38ECHO BuildNightly: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe GridSolutionsFramework.buildproj /p:ForceBuild=false %logflag%
40"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" GridSolutionsFramework.buildproj /p:BuildDeployFolder=%deploy%;NugetApiKey=%api_key%;NugetPackagesFolder=%package%;ForceBuild=false /l:FileLogger,Microsoft.Build.Engine;logfile=%logger% 39"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" GridSolutionsFramework.buildproj /p:ForceBuild=false %logflag%
41endlocal40endlocal
Build/Scripts/BuildNightlyNoHelp.bat+0−41
@@ -1,41 +0,0 @@
1::*******************************************************************************************************
2:: BuildNightly.bat - Gbtc
3::
4:: Copyright � 2013, Grid Protection Alliance. All Rights Reserved.
5::
6:: Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
7:: the NOTICE file distributed with this work for additional information regarding copyright ownership.
8:: The GPA licenses this file to you under the Eclipse Public License -v 1.0 (the "License"); you may
9:: not use this file except in compliance with the License. You may obtain a copy of the License at:
10::
11:: http://www.opensource.org/licenses/eclipse-1.0.php
12::
13:: Unless agreed to in writing, the subject software distributed under the License is distributed on an
14:: "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
15:: License for the specific language governing permissions and limitations.
16::
17:: Code Modification History:
18:: -----------------------------------------------------------------------------------------------------
19:: 10/20/2009 - Pinal C. Patel
20:: Generated original version of source code.
21:: 09/14/2010 - Mihir Brahmbhatt
22:: Change Framework path from v3.5 to v4.0
23:: 10/03/2010 - Pinal C. Patel
24:: Updated to use MSBuild 4.0.
25:: 08/25/2014 - Gavin E. Holden
26:: Modified to call CommonBuild.bat.
27:: 01/13/2015 - Stephen C. Wills
28:: Modified to match BuildBetaNoHelp.bat.
29::
30::*******************************************************************************************************
31
32@ECHO OFF
33
34SetLocal EnableDelayedExpansion
35
36ECHO BuildNightly: CALL CommonBuild.bat %*
37CALL CommonBuild.bat %*
38
39ECHO BuildNightly: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe GridSolutionsFramework.buildproj /p:BuildDeployFolder=%deploy%;NugetApiKey=%api_key%;NugetPackagesFolder=%package%;ForceBuild=false;SkipHelpFiles=true /l:FileLogger,Microsoft.Build.Engine;logfile=%logger%
40"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" GridSolutionsFramework.buildproj /p:BuildDeployFolder=%deploy%;NugetApiKey=%api_key%;NugetPackagesFolder=%package%;ForceBuild=false;SkipHelpFiles=true /l:FileLogger,Microsoft.Build.Engine;logfile=%logger%
41endlocal
Build/Scripts/BuildRelease.batrenamed from Build/Scripts/BuildMono.bat+13−4
@@ -1,5 +1,5 @@
1::*******************************************************************************************************1::*******************************************************************************************************
2:: BuildMono.bat - Gbtc2:: BuildRelease.bat - Gbtc
3::3::
4:: Copyright � 2013, Grid Protection Alliance. All Rights Reserved.4:: Copyright � 2013, Grid Protection Alliance. All Rights Reserved.
5::5::
@@ -16,11 +16,20 @@ · 10 unmodified lines
16::16::
17:: Code Modification History:17:: Code Modification History:
18:: -----------------------------------------------------------------------------------------------------18:: -----------------------------------------------------------------------------------------------------
19:: 08/26/2013 - J. Ritchie Carroll19:: 10/05/2009 - Pinal C. Patel
20:: Generated original version of source code.20:: Generated original version of source code.
21:: 10/20/2009 - Pinal C. Patel
22:: Modified to force a build and suppress archives from being published to public locations.
23:: 10/03/2010 - Pinal C. Patel
24:: Updated to use MSBuild 4.0.
21::25::
22::*******************************************************************************************************26::*******************************************************************************************************
23 27
24@ECHO OFF28@ECHO OFF
25"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" GridSolutionsFramework.buildproj /p:ForceBuild=true;BuildFlavor=Mono;BuildDeployFolder=\\GPAWEB\NightlyBuilds\GridSolutionsFramework\Mono\;BinariesArchiveFileName=\\GPAWEB\NightlyBuilds\GridSolutionsFramework\Mono\GridSolutionsFramework.MonoBinaries.zip /l:FileLogger,Microsoft.Build.Engine;logfile=GridSolutionsFrameworkMono.output29
26PAUSE30SetLocal
31
32IF NOT "%1" == "" SET logflag=/l:FileLogger,Microsoft.Build.Engine;logfile=%1
33
34ECHO BuildRelease: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe GridSolutionsFramework.buildproj /p:ForceBuild=true;PreRelease=false %logflag%
35"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" GridSolutionsFramework.buildproj /p:ForceBuild=true;PreRelease=false %logFlag%
Build/Scripts/CommonBuild.bat+0−111
@@ -1,111 +0,0 @@
1::*******************************************************************************************************
2:: CommonBuild.bat - Gbtc
3::
4:: Copyright © 2013, Grid Protection Alliance. All Rights Reserved.
5::
6:: Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
7:: the NOTICE file distributed with this work for additional information regarding copyright ownership.
8:: The GPA licenses this file to you under the Eclipse Public License -v 1.0 (the "License"); you may
9:: not use this file except in compliance with the License. You may obtain a copy of the License at:
10::
11:: http://www.opensource.org/licenses/eclipse-1.0.php
12::
13:: Unless agreed to in writing, the subject software distributed under the License is distributed on an
14:: "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
15:: License for the specific language governing permissions and limitations.
16::
17:: Code Modification History:
18:: -----------------------------------------------------------------------------------------------------
19:: 8/25/2014 - Gavin E. Holden
20:: Generated original version of source code.
21::
22::*******************************************************************************************************
23
24@echo off
25
26set show_help=0
27if [%1]==[] set show_help=1
28if "%1"=="/?" set show_help=1
29if %show_help%==1 (
30echo.
31echo Help File:
32echo Explain Parameters
33echo.
34echo /u = TFS User Name
35echo /p = TFS Password
36echo /d = Build Deploy Location (required^)
37echo /o = Nuget Package Location (required^)
38echo /l = Logger
39echo /f = Force Build (booleen^)
40echo /k = nuget.org API Key
41)
42set tfs_user_name=""
43set tfs_password=""
44set deploy=""
45set package=""
46set logger=""
47set api_key=""
48set %%y=""
49set item=""
50set set_user=0
51set set_pass=0
52set set_deploy=0
53set set_pkg=0
54set set_log=0
55set set_apiKey=0
56for %%y in (%*) do (
57 rem Set TFS User Name
58 if !set_user!==1 (
59 set tfs_user_name=%%y
60 set set_user=0
61 )
62 if %%y==/u (
63 set set_user=1
64 )
65 rem Set TFS Password
66 if !set_pass!==1 (
67 set tfs_password=%%y
68 set set_pass=0
69 )
70 if %%y==/p (
71 set set_pass=1
72 )
73 rem Set Build Deploy Folder
74 if !set_deploy!==1 (
75 set deploy=%%y
76 set set_deploy=0
77 )
78 if %%y==/d (
79 set set_deploy=1
80 )
81 rem Set Nuget Package Location
82 if !set_pkg!==1 (
83 set package=%%y
84 set set_pkg=0
85 )
86 if %%y==/o (
87 set set_pkg=1
88 )
89 rem Set Logger
90 if !set_log!==1 (
91 set logger=%%y
92 set set_log=0
93 )
94 if %%y==/l (
95 set set_log=1
96 )
97 rem Set NugetApiKey
98 if !set_apiKey!==1 (
99 set api_key=%%y
100 set set_apiKey=0
101 )
102 if %%y==/k (
103 set set_apiKey=1
104 )
105)
106
107
108
109
110
111
Build/Scripts/MasterBuild.buildproj+8−3
@@ -119,6 +119,8 @@ · 118 unmodified lines
119 <ForceBuild></ForceBuild>119 <ForceBuild></ForceBuild>
120 <!-- Skips the versioning process and just executes build steps. -->120 <!-- Skips the versioning process and just executes build steps. -->
121 <SkipVersioning></SkipVersioning>121 <SkipVersioning></SkipVersioning>
122 <!-- Prevents the build script from pushing to the remote repository. -->
123 <DoNotPush></DoNotPush>
122 <!--Executes build without running unit tests when true.-->124 <!--Executes build without running unit tests when true.-->
123 <SkipUnitTest>True</SkipUnitTest>125 <SkipUnitTest>True</SkipUnitTest>
124 <!-- Name of binaries archive file. -->126 <!-- Name of binaries archive file. -->
@@ -302,11 +304,13 @@ · 177 unmodified lines
302 <NuGet Condition="'$(NuGet)' == ''">$(ProgramFiles64)\NuGet\nuget.exe</NuGet>304 <NuGet Condition="'$(NuGet)' == ''">$(ProgramFiles64)\NuGet\nuget.exe</NuGet>
303 <GitClient Condition="'$(GitClient)' == ''">$(ProgramFiles32)\Git\cmd\git.exe</GitClient>305 <GitClient Condition="'$(GitClient)' == ''">$(ProgramFiles32)\Git\cmd\git.exe</GitClient>
304 <GitBranch Condition="'$(GitBranch)' == ''">master</GitBranch>306 <GitBranch Condition="'$(GitBranch)' == ''">master</GitBranch>
307 <SetUpWorkspace Condition="'$(SetUpWorkspace)' == ''">True</SetUpWorkspace>
305 <VisualStudio Condition="'$(VisualStudio)' == ''">$(VS140COMNTOOLS)\..\IDE\devenv.com</VisualStudio>308 <VisualStudio Condition="'$(VisualStudio)' == ''">$(VS140COMNTOOLS)\..\IDE\devenv.com</VisualStudio>
306 <MSTest Condition="'$(MSTest)' == ''">$(VS140COMNTOOLS)\..\IDE\mstest.exe</MSTest>309 <MSTest Condition="'$(MSTest)' == ''">$(VS140COMNTOOLS)\..\IDE\mstest.exe</MSTest>
307 <SandcastleBuilder Condition="'$(SandcastleBuilder)' == ''">$(SHFBROOT)\SandcastleBuilderGUI.exe</SandcastleBuilder>310 <SandcastleBuilder Condition="'$(SandcastleBuilder)' == ''">$(SHFBROOT)\SandcastleBuilderGUI.exe</SandcastleBuilder>
308 <ForceBuild Condition="'$(ForceBuild)' == ''">false</ForceBuild>311 <ForceBuild Condition="'$(ForceBuild)' == ''">false</ForceBuild>
309 <SkipVersioning Condition="'$(SkipVersioning)' == ''">false</SkipVersioning>312 <SkipVersioning Condition="'$(SkipVersioning)' == ''">false</SkipVersioning>
313 <DoNotPush Condition="'$(DoNotPush)' == ''">false</DoNotPush>
310 <BinariesArchiveFileName Condition="'$(BinariesArchiveFileName)' == ''">$(LocalFolder)\$(ProjectName).Binaries.zip</BinariesArchiveFileName>314 <BinariesArchiveFileName Condition="'$(BinariesArchiveFileName)' == ''">$(LocalFolder)\$(ProjectName).Binaries.zip</BinariesArchiveFileName>
311 <InstallsArchiveFileName Condition="'$(InstallsArchiveFileName)' == ''">$(LocalFolder)\$(ProjectName).Installs.zip</InstallsArchiveFileName>315 <InstallsArchiveFileName Condition="'$(InstallsArchiveFileName)' == ''">$(LocalFolder)\$(ProjectName).Installs.zip</InstallsArchiveFileName>
312 <ScriptsArchiveFileName Condition="'$(ScriptsArchiveFileName)' == ''">$(LocalFolder)\$(ProjectName).Scripts.zip</ScriptsArchiveFileName>316 <ScriptsArchiveFileName Condition="'$(ScriptsArchiveFileName)' == ''">$(LocalFolder)\$(ProjectName).Scripts.zip</ScriptsArchiveFileName>
@@ -340,15 +344,16 @@ · 27 unmodified lines
340 <RemoveDir Directories="$(LocalFolder)" Condition="Exists('$(LocalFolder)') And !Exists('$(LocalFolder)\.git')"/>344 <RemoveDir Directories="$(LocalFolder)" Condition="Exists('$(LocalFolder)') And !Exists('$(LocalFolder)\.git')"/>
341 <MakeDir Directories="$(LocalFolder)" Condition="!Exists('$(LocalFolder)')"/>345 <MakeDir Directories="$(LocalFolder)" Condition="!Exists('$(LocalFolder)')"/>
342 <Exec Command="%22$(GitClient)%22 clone %22$(GitServer)%22 ." WorkingDirectory="$(LocalFolder)" Condition="!Exists('$(LocalFolder)\.git')"/>346 <Exec Command="%22$(GitClient)%22 clone %22$(GitServer)%22 ." WorkingDirectory="$(LocalFolder)" Condition="!Exists('$(LocalFolder)\.git')"/>
343 <Exec Command="%22$(GitClient)%22 checkout %22$(GitBranch)%22" WorkingDirectory="$(LocalFolder)"/>347 <Exec Command="%22$(GitClient)%22 checkout %22$(GitBranch)%22" WorkingDirectory="$(LocalFolder)" Condition="'$(SetUpWorkspace)' != 'False'"/>
344 </Target>348 </Target>
345 349
346 <Target Name="AfterCreateWorkspace"/>350 <Target Name="AfterCreateWorkspace"/>
347 <Target Name="BeforeUpdateRepository"/>351 <Target Name="BeforeUpdateRepository"/>
348 352
349 <Target Name="CoreUpdateRepository">353 <Target Name="CoreUpdateRepository" Condition="'$(SetUpWorkspace)' != 'False'">
350 <!-- Get source code for the specified version. -->354 <!-- Get source code for the specified version. -->
351 <Message Text="Getting latest updates from repo..."/>355 <Message Text="Getting latest updates from repo..."/>
356 <Exec Command="%22$(GitClient)%22 gc" WorkingDirectory="$(LocalFolder)"/>
352 <Exec Command="%22$(GitClient)%22 fetch" WorkingDirectory="$(LocalFolder)"/>357 <Exec Command="%22$(GitClient)%22 fetch" WorkingDirectory="$(LocalFolder)"/>
353 <Exec Command="%22$(GitClient)%22 reset --hard %22origin/$(GitBranch)%22" WorkingDirectory="$(LocalFolder)"/>358 <Exec Command="%22$(GitClient)%22 reset --hard %22origin/$(GitBranch)%22" WorkingDirectory="$(LocalFolder)"/>
354 <Exec Command="%22$(GitClient)%22 clean -f -d -x" WorkingDirectory="$(LocalFolder)"/>359 <Exec Command="%22$(GitClient)%22 clean -f -d -x" WorkingDirectory="$(LocalFolder)"/>
@@ -494,7 +499,7 @@ · 139 unmodified lines
494 <Target Name="AfterDeployBuild"/>499 <Target Name="AfterDeployBuild"/>
495 <Target Name="BeforePushToServer"/>500 <Target Name="BeforePushToServer"/>
496 501
497 <Target Name="CorePushToServer" Condition="'$(SkipVersioning)' != 'true'">502 <Target Name="CorePushToServer" Condition="'$(DoNotPush)' == 'false' And '$(SkipVersioning)' != 'true'">
498 <!-- Commit all of the pending changes. -->503 <!-- Commit all of the pending changes. -->
499 <Message Text="Pushing changes to Git server..." />504 <Message Text="Pushing changes to Git server..." />
500 <Exec Command="%22$(GitClient)%22 push origin $(GitBranch):$(GitBranch)" WorkingDirectory="$(LocalFolder)" ContinueOnError="true" />505 <Exec Command="%22$(GitClient)%22 push origin $(GitBranch):$(GitBranch)" WorkingDirectory="$(LocalFolder)" ContinueOnError="true" />

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t