Permalink
Browse files

Merge branch 'master' of github.com:seif/Sharp-Architecture-Build

  • Loading branch information...
seif committed Dec 22, 2011
2 parents 588414b + 3ac5b06 commit 0087ef77343798a3ce3f4b6c7c76b39439a55afe
@@ -26,19 +26,42 @@
<VersionXmlFile>$(VersioningPath)\VersionNumber.exe.config</VersionXmlFile>
</PropertyGroup>
+ <!-- Versioning properties -->
<Choose>
- <When Condition="'$(BUILD_NUMBER)' != ''">
- <PropertyGroup>
- <GlobalBuildVersionNumber>$(BUILD_NUMBER)</GlobalBuildVersionNumber>
- </PropertyGroup>
- </When>
+ <When Condition="'$(BUILD_NUMBER)' != ''">
+ <PropertyGroup>
+ <VersionBuild>$(BUILD_NUMBER)</VersionBuild>
+ </PropertyGroup>
+ </When>
<Otherwise>
- <PropertyGroup>
- <GlobalBuildVersionNumber>2.0.0.0</GlobalBuildVersionNumber>
- </PropertyGroup>
+ <PropertyGroup>
+ <VersionBuild>0</VersionBuild>
+ </PropertyGroup>
</Otherwise>
</Choose>
-
+
+ <PropertyGroup>
+ <VersionMajor Condition="'$(VersionMajor)'==''">1</VersionMajor>
+ <VersionMinor Condition="'$(VersionMinor)'==''">0</VersionMinor>
+ <VersionPatch Condition="'$(VersionPatch)'==''">0</VersionPatch>
+ <VersionPreRelease Condition="'$(VersionPreRelease)'==''"></VersionPreRelease>
+ </PropertyGroup>
+
+ <Choose>
+ <When Condition="'$(VersionPreRelease)' != ''">
+ <PropertyGroup>
+ <SemanticVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(VersionPreRelease)</SemanticVersion>
+ </PropertyGroup>
+ </When>
+ <Otherwise>
+ <PropertyGroup>
+ <SemanticVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)</SemanticVersion>
+ </PropertyGroup>
+ </Otherwise>
+ </Choose>
+
+
+
<ItemGroup>
<SolutionsToBuild Include="$(SolutionsPath)\$(SolutionName).sln;"/>
<ProjectBuildArtefactFolders Include="$(ApplicationsPath)\$(SolutionName)\bin;
View
@@ -40,7 +40,7 @@
$(WebAppPath)\**\Registrars\**;
$(WebAppPath)\**\ResourceFiles\**;">
- <PackageName>$(DropsPath)\$(GlobalBuildVersionNumber)\$(PackageName).v$(GlobalBuildVersionNumber).zip</PackageName>
+ <PackageName>$(DropsPath)\$(SemanticVersion)\$(PackageName).v$(SemanticVersion).zip</PackageName>
<WorkingDirectory>$(WebAppPath)</WorkingDirectory>
<flatten>False</flatten>
</PackageFiles>
@@ -49,14 +49,14 @@
Exclude="$(WebAppPath)\**\bin\**;
$(WebAppPath)\**\Logs\**;
$(WebAppPath)\**\obj\**;">
- <PackageName>$(DropsPath)\$(GlobalBuildVersionNumber)\$(PackageName).Source.v$(GlobalBuildVersionNumber).zip</PackageName>
+ <PackageName>$(DropsPath)\$(SemanticVersion)\$(PackageName).Source.v$(SemanticVersion).zip</PackageName>
<WorkingDirectory>$(WebAppPath)</WorkingDirectory>
<flatten>False</flatten>
</PackageFiles>
<PackageFiles Include="$(SpecificationReportPath)\**\*.*">
- <PackageName>$(DropsPath)\$(GlobalBuildVersionNumber)\$(PackageName).Specifications.v$(GlobalBuildVersionNumber).zip</PackageName>
+ <PackageName>$(DropsPath)\$(SemanticVersion)\$(PackageName).Specifications.v$(SemanticVersion).zip</PackageName>
<WorkingDirectory>$(SpecificationReportPath)</WorkingDirectory>
<flatten>False</flatten>
</PackageFiles>
@@ -12,7 +12,7 @@
<MSBuild
Projects="@(SolutionsToBuild)"
- Properties="$(ForcedMSBuildProperties);BuildNumber=$(GlobalBuildVersionNumber)" />
+ Properties="$(ForcedMSBuildProperties);BuildNumber=$(VersionBuild)" />
</Target>
@@ -4,7 +4,7 @@
<Target Name="CreateDrops">
- <MakeDir Directories="$(DropsPath)\$(GlobalBuildVersionNumber)\"/>
+ <MakeDir Directories="$(DropsPath)\$(SemanticVersion)\"/>
</Target>
View
@@ -17,11 +17,11 @@
Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"
XmlFileName="$(NugetWorkspace)\%(NugetPackage.PackageName)\%(NugetPackage.NuspecFile)"
XPath="//*/*/nu:version"
- Value="$(GlobalBuildVersionNumber)" />
+ Value="$(SemanticVersion)" />
- <Exec WorkingDirectory="$(DropsPath)\$(GlobalBuildVersionNumber)\"
+ <Exec WorkingDirectory="$(DropsPath)\$(SemanticVersion)\"
Command="$(ToolsPath)\nuget.exe pack $(NugetWorkspace)\%(NugetPackage.PackageName)\%(NugetPackage.NuspecFile)" />
- <Message Text="##teamcity[publishArtifacts '$(DropsPath)\$(GlobalBuildVersionNumber)\%(NugetPackage.PackageName).$(GlobalBuildVersionNumber).nupkg']" />
+ <Message Text="##teamcity[publishArtifacts '$(DropsPath)\$(SemanticVersion)\%(NugetPackage.PackageName).$(SemanticVersion).nupkg']" />
</Target>
</Project>
View
@@ -3,32 +3,32 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All">
<PropertyGroup>
- <TemplifyWorkingPath>$(DropsPath)\Temp$(GlobalBuildVersionNumber)</TemplifyWorkingPath>
+ <TemplifyWorkingPath>$(DropsPath)\Temp$(SemanticVersion)</TemplifyWorkingPath>
</PropertyGroup>
<Target Name="Templify">
<Message Text="Templifying with:
Author=$(TemplifyPackageAuthor)
Name=$(TemplifyPackageName)
- PackageRepositoryPath=$(DropsPath)\$(GlobalBuildVersionNumber)
+ PackageRepositoryPath=$(DropsPath)\$(SemanticVersion)
PackageRepositoryWorkingPath=$(TemplifyWorkingPath)
Path=$(SolutionsPath)
Tokens=@(TemplifyTokens)
- Version=$(GlobalBuildVersionNumber)" />
+ Version=$(SemanticVersion)" />
<MakeDir Directories="$(TemplifyWorkingPath)" />
<CreatePackage Author="$(TemplifyPackageAuthor)"
Name="$(TemplifyPackageName)"
- PackageRepositoryPath="$(DropsPath)\$(GlobalBuildVersionNumber)"
+ PackageRepositoryPath="$(DropsPath)\$(SemanticVersion)"
PackageRepositoryWorkingPath="$(TemplifyWorkingPath)"
Path="$(SolutionsPath)"
Tokens="@(TemplifyTokens)"
- Version="$(GlobalBuildVersionNumber)"
+ Version="$(SemanticVersion)"
ContinueOnError="true" />
- <Message Text="##teamcity[publishArtifacts '$(DropsPath)\$(GlobalBuildVersionNumber)\*.pkg']" />
+ <Message Text="##teamcity[publishArtifacts '$(DropsPath)\$(SemanticVersion)\*.pkg']" />
<RemoveDir Directories="$(TemplifyWorkingPath)" />
@@ -4,9 +4,9 @@
<Target Name="UpdateAssemblyVersion">
<MSBuild.Community.tasks.AssemblyInfo OutputFile="$(AssemblyVersionFile)"
CodeLanguage="C#"
- AssemblyFileVersion="$(GlobalBuildVersionNumber)"
- AssemblyInformationalVersion="$(GlobalBuildVersionNumber)"
- AssemblyVersion="$(GlobalBuildVersionNumber)" />
+ AssemblyFileVersion="$(VersionMajor).$(VersionMinor).$(VersionPatch).$(VersionBuild)"
+ AssemblyInformationalVersion="$(SemanticVersion)"
+ AssemblyVersion="$(VersionMajor).$(VersionMinor).0.0" />
</Target>
</Project>
View
Binary file not shown.

0 comments on commit 0087ef7

Please sign in to comment.