Merge pull request #288 from spraints/build-releases
Automate release building.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="xunit.runners" version="1.9.1" />
|
||||
<package id="MSBuildTasks" version="1.4.0.45" />
|
||||
</packages>
|
||||
|
||||
@@ -21,6 +21,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{F52EAF
|
||||
.nuget\nuget.targets = .nuget\nuget.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CDE05FFA-9DDB-4694-8CA6-6DB7B235CD7F}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
CI.proj = CI.proj
|
||||
Release.proj = Release.proj
|
||||
Releasing.md = Releasing.md
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{4A46FEEE-B8A2-4445-B9D1-8160520C7301}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
docs\config.md = docs\config.md
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Help" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<SolutionDir>.</SolutionDir>
|
||||
<BuildDir>$(SolutionDir)/GitTfs/bin/Release</BuildDir>
|
||||
<PackagedDir>$(SolutionDir)/Releases</PackagedDir>
|
||||
<TargetPlatform>AnyCPU</TargetPlatform>
|
||||
<TargetPlatform Condition="Exists('$(SolutionDir)/GitTfs.Vs2008/GitTfs.Vs2008.csproj')">x86</TargetPlatform>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<PackagesConfig>$(SolutionDir)/.nuget/packages.config</PackagesConfig>
|
||||
<RequireRestoreConsent>false</RequireRestoreConsent>
|
||||
<MSBuildCommunityTasksPath>$(SolutionDir)/packages/MSBuildTasks.1.4.0.45/tools</MSBuildCommunityTasksPath>
|
||||
<MSBuildCommunityTasksLib>$(MSBuildCommunityTasksPath)/MSBuild.Community.Tasks.dll</MSBuildCommunityTasksLib>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)/.nuget/nuget.targets" />
|
||||
|
||||
<Target Name="Help">
|
||||
<ReadLinesFromFile File="Releasing.md">
|
||||
<Output TaskParameter="Lines" ItemName="DeployInstructions"/>
|
||||
</ReadLinesFromFile>
|
||||
<Message Text="@(DeployInstructions->'%(Identity)','%0a%0d')" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Release" DependsOnTargets="Build; Package">
|
||||
</Target>
|
||||
|
||||
<Target Name="Build">
|
||||
<MSBuild Projects="GitTfs.sln" Targets="Rebuild" Properties="Configuration=Release;Platform=$(TargetPlatform);WarningLevel=0" />
|
||||
</Target>
|
||||
|
||||
<UsingTask AssemblyFile="$(MSBuildCommunityTasksLib)" TaskName="MSBuild.Community.Tasks.Zip" />
|
||||
<ItemGroup>
|
||||
<ReleaseFiles Include="$(SolutionDir)\README.md" />
|
||||
<ReleaseFiles Include="$(SolutionDir)\LICENSE" />
|
||||
<ReleaseFiles Include="$(SolutionDir)\NOTICE" />
|
||||
<ReleaseFiles Include="$(BuildDir)\git-tfs.exe" />
|
||||
<ReleaseFiles Include="$(BuildDir)\*.config" />
|
||||
<ReleaseFiles Include="$(BuildDir)\*.dll" Exclude="$(BuildDir)\Microsoft.*.dll" />
|
||||
<ReleaseFiles Include="$(BuildDir)\NativeBinaries\**\*.dll" />
|
||||
</ItemGroup>
|
||||
<Target Name="Package" DependsOnTargets="RestorePackages; Version">
|
||||
<Zip Files="@(ReleaseFiles)" ZipFileName="$(Archive)" WorkingDirectory="$(BuildDir)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Version">
|
||||
<ReadLinesFromFile File="$(SolutionDir)\VERSION">
|
||||
<Output TaskParameter="Lines" PropertyName="Version" />
|
||||
</ReadLinesFromFile>
|
||||
<PropertyGroup>
|
||||
<Archive>$(PackagedDir)/GitTfs-$(Version).zip</Archive>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,14 @@
|
||||
BUILDING AND RELEASING GIT-TFS
|
||||
------------------------------
|
||||
|
||||
Normally, you should do this:
|
||||
|
||||
1. Update the version in VERSION and Version.cs, commit, tag.
|
||||
|
||||
2. Build the release:
|
||||
|
||||
msbuild Release.proj /t:Release
|
||||
|
||||
3. Upload the release somewhere.
|
||||
|
||||
4. Update [the download button](https://github.com/git-tfs/git-tfs.github.com/blob/master/_includes/download_button.html) on the website.
|
||||
Reference in New Issue
Block a user