Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Commit

Permalink
Put version in separate file.
Browse files Browse the repository at this point in the history
  • Loading branch information
damianh committed Mar 17, 2017
1 parent 16ac1f0 commit 826fd07
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 4 additions & 1 deletion build.cake
@@ -1,4 +1,5 @@
#addin "nuget:?package=NuGet.Core&version=2.8.6"
#addin "Cake.FileHelpers"
#tool "nuget:?package=xunit.runner.console&version=2.1.0"

var target = Argument("target", "Default");
Expand Down Expand Up @@ -60,9 +61,11 @@ Task("CreateNugetPackages")
{
var nuspecFilePath = buildDir.Path + "/LibLog.nuspec";
CopyFile("./src/LibLog/LibLog.nuspec", nuspecFilePath);
var version = System.IO.File.ReadLines("version.txt").First() + "-build" + buildNumber.PadLeft(5, '0');
var settings = new NuGetPackSettings
{
OutputDirectory = buildDir.Path
OutputDirectory = buildDir.Path,
Version = version
};
NuGetPack(nuspecFilePath, settings);
});
Expand Down
3 changes: 0 additions & 3 deletions src/LibLog/LibLog.csproj
Expand Up @@ -46,9 +46,6 @@
<Compile Include="LibLog.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="LibLog.nuspec" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
1 change: 1 addition & 0 deletions version.txt
@@ -0,0 +1 @@
4.3.0

2 comments on commit 826fd07

@gep13
Copy link

@gep13 gep13 commented on 826fd07 Mar 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@damianh WAT! No GitVersion? 😄

@damianh
Copy link
Owner Author

@damianh damianh commented on 826fd07 Mar 17, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.