Skip to content

Commit 9d7e34c

Browse files
author
JoshuaMiller
committed
nuget package version
1 parent f5cd3f4 commit 9d7e34c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Jenkins.NET.Publishing/Publish_Win.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.IO;
66
using System.Threading;
77
using System.Threading.Tasks;
8+
using Photon.Framework.Tools;
89

910
namespace Jenkins.NET.Publishing
1011
{
@@ -35,6 +36,9 @@ private async Task BuildSolution(CancellationToken token)
3536

3637
private async Task PublishPackage(CancellationToken token)
3738
{
39+
var assemblyFilename = Path.Combine(Context.ContentDirectory, "Jenkins.NET", "bin", "Release", "Jenkins.NET.dll");
40+
var version = AssemblyTools.GetVersion(assemblyFilename);
41+
3842
var apiKey = Context.ServerVariables["global"]["nuget.apiKey"];
3943

4044
var nugetTool = new NuGetPackagePublisher(Context) {
@@ -53,7 +57,7 @@ private async Task PublishPackage(CancellationToken token)
5357
PackageDirectory = Path.Combine(Context.WorkDirectory, "Packages"),
5458
//Configuration = "Release",
5559
//Platform = "AnyCPU",
56-
Version = "*",
60+
Version = version,
5761
PackProperties = {
5862
["configuration"] = "Release",
5963
["platform"] = "AnyCPU",

0 commit comments

Comments
 (0)