230 lines · 11.6 KB · Text
RawDownload
<?xml version="1.0" encoding="utf-8"?> <!--*********************************************************************************************************  GridSolutionFramework.buildproj - Gbtc****  Copyright © 2013, Grid Protection Alliance.  All Rights Reserved.****  Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See**  the NOTICE file distributed with this work for additional information regarding copyright ownership.**  The GPA licenses this file to you under the Eclipse Public License -v 1.0 (the "License"); you may**  not use this file except in compliance with the License. You may obtain a copy of the License at:****      http://www.opensource.org/licenses/eclipse-1.0.php****  Unless agreed to in writing, the subject software distributed under the License is distributed on an**  "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the**  License for the specific language governing permissions and limitations.****  Code Modification History:**  ===================================================================================================**  10/05/2009 - Pinal C. Patel**       Generated original version of source code.**  10/10/2009 - Pinal C. Patel**       Modified to accommodate the change in file versioning.**  10/13/2009 - Pinal C. Patel**       Made building of help docs optional using SkipHelpFiles property.**  10/15/2009 - Pinal C. Patel**       Enabled unit testing.**  10/19/2009 - Pinal C. Patel**       Enabled archiving of binaries and installs.**  10/20/2009 - Pinal C. Patel**       Made deployment of archives to public locations switchable.**  12/25/2010 - Pinal C. Patel**       Generated original version of source code.**  04/27/2010 - Pinal C. Patel**       Moved initialization of version and project files to after the build has been initialized**       so that they don't include files that have to deleted of moved since the last build.**  04/28/2010 - Pinal C. Patel**       Modified the build to output a set of signed class libraries by leveraging the newly added**       ProjectsToBuild.Properties property.**       Made building of strong-named class libraries optional using SkipSigning property.**  08/04/2010 - Pinal C. Patel**       Disabled automated zip file creation of binaries and installs.**  11/02/2010 - Pinal C. Patel**       Enabled automated zip file creation of binaries and installs.**       Fixed a typo in ProjectsToBuild list initialization that was preventing signed assemblies **       from being created.**       Enabled version change in AssemblyFileVersion attribute for all of the versioned projects.**  01/08/2011 - Pinal C. Patel**       Updated to set the TftServer property.**       Updated to set versioning scheme settings.**  02/04/2011 - Pinal C. Patel**       Updated to set the TftServer property.**       Updated to set versioning scheme settings.**  03/17/2011 - Pinal C. Patel**       Added the creation of NuGet package.**  05/31/2011 - Pinal C. Patel**       Modified to create symbol packages to accompany NuGet library packages.**  06/02/2011 - Pinal C. Patel**       Modified to create NuGet sample packages.**  07/22/2011 - Pinal C. Patel**       Updated to skip NuGet package creation if versioning is skipped and added SkipNuGetPackages**       property to allow NuGet package creation to be skipped even when versioning is performed.**  12/01/2011 - Pinal C. Patel**       Updated to version and build setup packages.**  02/08/2012 - Pinal C. Patel**       Updated to support creation of pre-release NuGet packages and publishing NuGet packages to**       the official NuGet.org packages feed.**  12/02/2014 - J. Ritchie Carroll**       Fixed NuGet version naming for pre-release roll-outs.*********************************************************************************************************--> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">   <Import Project="MasterBuild.buildproj"/>   <PropertyGroup>    <SkipNuGetPackages>false</SkipNuGetPackages>  </PropertyGroup>   <Target Name="BeforePrepareSettings">    <!--    <Error Condition="'$(NuGetPackagesFolder)' == ''"  Text="Error: Location of NuGet Packages must be specified."/>    <Error Condition="'$(BuildDeployFolder)' == ''" Text="Error: Drop location of the build content must be specified."/>    -->    <PropertyGroup>      <!--Must-override setting(s).-->      <ProjectName>GridSolutionsFramework</ProjectName>      <GitServer>git@github.com:GridProtectionAlliance/gsf.git</GitServer>      <VersionBuildChange>Increment</VersionBuildChange>      <VersionRevisionChange>Reset</VersionRevisionChange>    </PropertyGroup>  </Target>   <Target Name="AfterPrepareSettings">    <PropertyGroup>      <!--Project specific settings.-->      <ProjectSolution>$(LocalFolder)\Source\$(ProjectName).sln</ProjectSolution>      <PreRelease Condition="'$(PreRelease)' == ''">true</PreRelease>      <NuGetPackagesFolder>$(NuGetPackagesFolder)</NuGetPackagesFolder>      <BuildDeployFolder>$(BuildDeployFolder)</BuildDeployFolder>    </PropertyGroup>  </Target>   <Target Name="BeforeVersionSource">    <Message Text="SkipVersioning = --$(SkipVersioning)--"/>    <Message Text="SkipNuGetPackages = --$(SkipNuGetPackages)--"/>    <ItemGroup>      <!--List of files to be versioned.-->      <FilesToVersion Include="$(LocalFolder)\Source\**\AssemblyInfo.*" Exclude="$(LocalFolder)\Source\OldCode\**\*.*">        <VersionRegex>(?'BeforeVersion'AssemblyVersion\(%22)(?'CoreVersion'(\*|\d+)\.)+(\*|\d+)(?'AfterVersion'%22\))</VersionRegex>        <VersionPrecision>4</VersionPrecision>      </FilesToVersion>      <FilesToVersion Include="$(LocalFolder)\Source\**\AssemblyInfo.*" Exclude="$(LocalFolder)\Source\OldCode\**\*.*">        <VersionRegex>(?'BeforeVersion'AssemblyFileVersion\(%22)(?'CoreVersion'(\*|\d+)\.)+(\*|\d+)(?'AfterVersion'%22\))</VersionRegex>        <VersionPrecision>4</VersionPrecision>      </FilesToVersion>      <FilesToVersion Include="$(LocalFolder)\Source\**\AssemblyInfo.*" Exclude="$(LocalFolder)\Source\OldCode\**\*.*">        <VersionRegex>(?'BeforeVersion'AssemblyInformationalVersion\(%22)(?'CoreVersion'(\*|\d+)\.)+(\*|\d+)(-beta)?(?'AfterVersion'%22\))</VersionRegex>        <VersionPrecision>3</VersionPrecision>        <VersionTag Condition="'$(PreRelease)' == 'true'">-beta</VersionTag>      </FilesToVersion>    </ItemGroup>  </Target>   <Target Name="BeforeBuildProjects">    <ItemGroup>      <!--List of projects to build.-->      <ProjectsToBuild Include="$(ProjectSolution)"/>      <ProjectsToBuild Include="$(LocalFolder)\Source\Documentation\GridSolutionsFrameworkHelp\GridSolutionsFrameworkHelp.shfbproj" Condition="'$(SkipHelpFiles)' != 'true'">        <AdditionalProperties>BuildAssemblerVerbosity=OnlyErrors</AdditionalProperties>      </ProjectsToBuild>      <ProjectsToBuild Include="$(LocalFolder)\Source\Documentation\AdapterHelp\AdapterHelp.shfbproj" Condition="'$(SkipHelpFiles)' != 'true'">        <AdditionalProperties>BuildAssemblerVerbosity=OnlyErrors</AdditionalProperties>      </ProjectsToBuild>    </ItemGroup>  </Target>   <Target Name="BeforeExecuteUnitTests">    <ItemGroup>      <!--List of unit test assemblies.-->      <UnitTestAssemblies Include="$(BuildOutputFolder)\**\*.Tests.dll"/>    </ItemGroup>  </Target>   <Target Name="AfterExecuteUnitTests">    <!--Clean-up after all unit tests have been executed and passed.-->    <RemoveDir Directories="%(UnitTestAssemblies.RootDir)%(UnitTestAssemblies.Directory)" Condition="Exists('%(UnitTestAssemblies.RootDir)%(UnitTestAssemblies.Directory)')"/>  </Target>   <Target Name="BeforeDeployBuild">    <!--Directories containing help files.-->    <PropertyGroup>      <HelpOutputFolder>$(BuildOutputFolder)\..\..\Help\</HelpOutputFolder>      <HelpDeployFolder>$(BuildDeployFolder)\..\Help\</HelpDeployFolder>    </PropertyGroup>          <ItemGroup>      <!--List of build scripts to deploy.-->      <BuildScripts Include="$(LocalFolder)\Build\Scripts\**\*.*"/>          <!--List of source code files to archive.-->      <SourcesToArchive Include="$(LocalFolder)\Source\**\*.*" Exclude="$(LocalFolder)\Source\**\obj\**\*.*; $(LocalFolder)\Source\OldCode\**\*.*"/>          <!--List of binaries to archive.-->      <BinariesToArchive Include="$(BuildOutputFolder)\**\*.*" Exclude="$(BuildOutputFolder)\**\*.msi"/>       <!--List of installs to archive.-->      <InstallsToArchive Include="$(BuildOutputFolder)\**\*.msi"/>       <!--Destinations of archive files (*.zip).-->      <ArchiveDestinations Include="$(BuildDeployFolder)"/>    </ItemGroup>  </Target>   <Target Name="AfterDeployBuild">    <CallTarget Targets="DeployBuildScripts"/>    <CallTarget Targets="DeployHelpFiles"/>    <CallTarget Targets="PublishNuGetPackages"/>  </Target>    <Target Name="DeployBuildScripts" Condition="'$(ForceBuild)' == 'true' And '$(BuildDeployFolder)' != ''">    <!-- Create archive of source tree. -->    <Message Text="Deploying build scripts..."/>    <Copy SourceFiles="@(BuildScripts)" DestinationFolder="$(BuildDeployFolder)\Build Scripts\%(BuildScripts.RecursiveDir)"/>  </Target>    <Target Name="DeployHelpFiles" Condition="'$(SkipHelpFiles)' != 'true' And '$(BuildOutputFolder)' != '' And '$(BuildDeployFolder)' != ''">    <!-- Copy help files to the deploy folder. -->    <Message Text="Deploying help files..."/>    <ItemGroup>      <HelpFilesToDeploy Include="$(HelpOutputFolder)\**\*.*"/>    </ItemGroup>    <MakeDir Directories="$(HelpDeployFolder)" Condition="!Exists('$(HelpDeployFolder)')"/>    <Copy SourceFiles="@(HelpFilesToDeploy)" DestinationFolder="$(HelpDeployFolder)\%(HelpFilesToDeploy.RecursiveDir)"/>  </Target>    <Target Name="PublishNuGetPackages" Condition="'$(SkipVersioning)' != 'true' And '$(SkipNuGetPackages)' != 'true'">    <!-- Delete existing NuGet packages. -->    <Message Text="Deleting NuGet packages..."/>    <ItemGroup>      <NuGetPackages Include="$(NuGetPackagesFolder)\GSF.*.$(Major).$(Minor)*.nupkg"/>    </ItemGroup>    <Delete Files="@(NuGetPackages)"/>     <!-- Create NuGet packages. -->    <Message Text="Creating NuGet library packages..."/>    <ItemGroup>      <NuGetLibraries Include="$(LocalFolder)\Source\Libraries\**\*.nuspec"/>    </ItemGroup>    <Exec Command="%22$(NuGet)%22 pack %22%(NuGetLibraries.RootDir)%(NuGetLibraries.Directory)%(NuGetLibraries.Filename).csproj%22 /Properties Configuration=$(BuildFlavor) /OutputDirectory %22$(NuGetPackagesFolder)%22" ContinueOnError="true"/>    <Message Text="Creating NuGet template packages..."/>    <ItemGroup>      <NuGetTemplates Include="$(LocalFolder)\Source\Templates\NuGet\**\*.nuspec"/>    </ItemGroup>    <Exec Command="%22$(NuGet)%22 pack %22%(NuGetTemplates.FullPath)%22 /Version $(Major).$(Minor).$(Build) /OutputDirectory %22$(NuGetPackagesFolder)%22" Condition="'$(PreRelease)' != 'true'" ContinueOnError="true"/>    <Exec Command="%22$(NuGet)%22 pack %22%(NuGetTemplates.FullPath)%22 /Version $(Major).$(Minor).$(Build)-beta /OutputDirectory %22$(NuGetPackagesFolder)%22" Condition="'$(PreRelease)' == 'true'" ContinueOnError="true"/>     <!-- Publish NuGet packages. -->    <Message Text="Publishing NuGet packages to NuGet.org..."/>    <ItemGroup>      <NuGetPackages Remove="@(NuGetPackages)"/>      <NuGetPackages Include="$(NuGetPackagesFolder)\GSF.*.$(Major).$(Minor)*.nupkg" Exclude="$(NuGetPackagesFolder)\GSF.*.$(Major).$(Minor)*.symbols.nupkg"/>    </ItemGroup>    <Exec Command="%22$(NuGet)%22 push %22%(NuGetPackages.FullPath)%22 $(NuGetApiKey) -Source https://api.nuget.org/v3/index.json" Condition="'@(NuGetPackages)' != ''" ContinueOnError="true"/>  </Target></Project>

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