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
2727 ::
2828 ::*******************************************************************************************************
2929
30−echo off
30+@ECHO OFF
3131
32−SetLocal EnableDelayedExpansion
32+SetLocal
3333
34−ECHO BuildBeta: CALL CommonBuild.bat %*
35−CALL CommonBuild.bat %*
34+IF NOT "%1" == "" SET logflag=/l:FileLogger,Microsoft.Build.Engine;logfile=%1
3635
37−ECHO 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%
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%
39−endlocal
36+ECHO BuildBeta: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe GridSolutionsFramework.buildproj /p:ForceBuild=true %logflag%
37+"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" GridSolutionsFramework.buildproj /p:ForceBuild=true %logFlag%
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−
32−echo off
33−
34−SetLocal EnableDelayedExpansion
35−
36−ECHO BuildBetaNoHelp: CALL CommonBuild.bat %*
37−CALL CommonBuild.bat %*
38−
39−ECHO 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%
41−endlocal
Build/Scripts/BuildNightly.bat+4−5
@@ -31,11 +31,10 @@ · 30 unmodified lines
3131
3232 @ECHO OFF
3333
34−SetLocal EnableDelayedExpansion
34+SetLocal
3535
36−ECHO BuildNightly: CALL CommonBuild.bat %*
37−CALL CommonBuild.bat %*
36+IF NOT "%1" == "" SET logflag=/l:FileLogger,Microsoft.Build.Engine;logfile=%1
3837
39−ECHO 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%
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%
38+ECHO BuildNightly: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe GridSolutionsFramework.buildproj /p:ForceBuild=false %logflag%
39+"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" GridSolutionsFramework.buildproj /p:ForceBuild=false %logflag%
4140 endlocal
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−
34−SetLocal EnableDelayedExpansion
35−
36−ECHO BuildNightly: CALL CommonBuild.bat %*
37−CALL CommonBuild.bat %*
38−
39−ECHO 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%
41−endlocal
Build/Scripts/BuildRelease.batrenamed from Build/Scripts/BuildMono.bat+13−4
@@ -1,5 +1,5 @@
11 ::*******************************************************************************************************
2−:: BuildMono.bat - Gbtc
2+:: BuildRelease.bat - Gbtc
33 ::
44 :: Copyright � 2013, Grid Protection Alliance. All Rights Reserved.
55 ::
@@ -16,11 +16,20 @@ · 10 unmodified lines
1616 ::
1717 :: Code Modification History:
1818 :: -----------------------------------------------------------------------------------------------------
19−:: 08/26/2013 - J. Ritchie Carroll
19+:: 10/05/2009 - Pinal C. Patel
2020 :: 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.
2125 ::
2226 ::*******************************************************************************************************
2327
2428 @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.output
26−PAUSE
29+
30+SetLocal
31+
32+IF NOT "%1" == "" SET logflag=/l:FileLogger,Microsoft.Build.Engine;logfile=%1
33+
34+ECHO 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−
26−set show_help=0
27−if [%1]==[] set show_help=1
28−if "%1"=="/?" set show_help=1
29−if %show_help%==1 (
30−echo.
31−echo Help File:
32−echo Explain Parameters
33−echo.
34−echo /u = TFS User Name
35−echo /p = TFS Password
36−echo /d = Build Deploy Location (required^)
37−echo /o = Nuget Package Location (required^)
38−echo /l = Logger
39−echo /f = Force Build (booleen^)
40−echo /k = nuget.org API Key
41−)
42−set tfs_user_name=""
43−set tfs_password=""
44−set deploy=""
45−set package=""
46−set logger=""
47−set api_key=""
48−set %%y=""
49−set item=""
50−set set_user=0
51−set set_pass=0
52−set set_deploy=0
53−set set_pkg=0
54−set set_log=0
55−set set_apiKey=0
56−for %%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
119119 <ForceBuild></ForceBuild>
120120 <!-- Skips the versioning process and just executes build steps. -->
121121 <SkipVersioning></SkipVersioning>
122+ <!-- Prevents the build script from pushing to the remote repository. -->
123+ <DoNotPush></DoNotPush>
122124 <!--Executes build without running unit tests when true.-->
123125 <SkipUnitTest>True</SkipUnitTest>
124126 <!-- Name of binaries archive file. -->
@@ -302,11 +304,13 @@ · 177 unmodified lines
302304 <NuGet Condition="'$(NuGet)' == ''">$(ProgramFiles64)\NuGet\nuget.exe</NuGet>
303305 <GitClient Condition="'$(GitClient)' == ''">$(ProgramFiles32)\Git\cmd\git.exe</GitClient>
304306 <GitBranch Condition="'$(GitBranch)' == ''">master</GitBranch>
307+ <SetUpWorkspace Condition="'$(SetUpWorkspace)' == ''">True</SetUpWorkspace>
305308 <VisualStudio Condition="'$(VisualStudio)' == ''">$(VS140COMNTOOLS)\..\IDE\devenv.com</VisualStudio>
306309 <MSTest Condition="'$(MSTest)' == ''">$(VS140COMNTOOLS)\..\IDE\mstest.exe</MSTest>
307310 <SandcastleBuilder Condition="'$(SandcastleBuilder)' == ''">$(SHFBROOT)\SandcastleBuilderGUI.exe</SandcastleBuilder>
308311 <ForceBuild Condition="'$(ForceBuild)' == ''">false</ForceBuild>
309312 <SkipVersioning Condition="'$(SkipVersioning)' == ''">false</SkipVersioning>
313+ <DoNotPush Condition="'$(DoNotPush)' == ''">false</DoNotPush>
310314 <BinariesArchiveFileName Condition="'$(BinariesArchiveFileName)' == ''">$(LocalFolder)\$(ProjectName).Binaries.zip</BinariesArchiveFileName>
311315 <InstallsArchiveFileName Condition="'$(InstallsArchiveFileName)' == ''">$(LocalFolder)\$(ProjectName).Installs.zip</InstallsArchiveFileName>
312316 <ScriptsArchiveFileName Condition="'$(ScriptsArchiveFileName)' == ''">$(LocalFolder)\$(ProjectName).Scripts.zip</ScriptsArchiveFileName>
@@ -340,15 +344,16 @@ · 27 unmodified lines
340344 <RemoveDir Directories="$(LocalFolder)" Condition="Exists('$(LocalFolder)') And !Exists('$(LocalFolder)\.git')"/>
341345 <MakeDir Directories="$(LocalFolder)" Condition="!Exists('$(LocalFolder)')"/>
342346 <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'"/>
344348 </Target>
345349
346350 <Target Name="AfterCreateWorkspace"/>
347351 <Target Name="BeforeUpdateRepository"/>
348352
349− <Target Name="CoreUpdateRepository">
353+ <Target Name="CoreUpdateRepository" Condition="'$(SetUpWorkspace)' != 'False'">
350354 <!-- Get source code for the specified version. -->
351355 <Message Text="Getting latest updates from repo..."/>
356+ <Exec Command="%22$(GitClient)%22 gc" WorkingDirectory="$(LocalFolder)"/>
352357 <Exec Command="%22$(GitClient)%22 fetch" WorkingDirectory="$(LocalFolder)"/>
353358 <Exec Command="%22$(GitClient)%22 reset --hard %22origin/$(GitBranch)%22" WorkingDirectory="$(LocalFolder)"/>
354359 <Exec Command="%22$(GitClient)%22 clean -f -d -x" WorkingDirectory="$(LocalFolder)"/>
@@ -494,7 +499,7 @@ · 139 unmodified lines
494499 <Target Name="AfterDeployBuild"/>
495500 <Target Name="BeforePushToServer"/>
496501
497− <Target Name="CorePushToServer" Condition="'$(SkipVersioning)' != 'true'">
502+ <Target Name="CorePushToServer" Condition="'$(DoNotPush)' == 'false' And '$(SkipVersioning)' != 'true'">
498503 <!-- Commit all of the pending changes. -->
499504 <Message Text="Pushing changes to Git server..." />
500505 <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