From 0563032b9e872846de0484c3cd6551d800abcbed Mon Sep 17 00:00:00 2001 From: Adam Wright Date: Sat, 1 Apr 2017 13:07:04 -0500 Subject: [PATCH] adding publish packages --- build.fsx | 12 ++++++++++-- ci_build.bat | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/build.fsx b/build.fsx index 0236090..9a26491 100644 --- a/build.fsx +++ b/build.fsx @@ -40,14 +40,19 @@ let nuspec = sprintf "%s.nuspec" projectName let projectFileName = sprintf "./source/%s/%s.csproj" projectName projectName let artifactsDir = "artifacts" let projectGuid = "E8C6B039-E310-41FE-9B83-1E163739CD9A" -let copyright = "2016" +let copyright = DateTime.Now.Year.ToString() +//publish parameters +let nugetApiKey = getBuildParamOrDefault "apikey" "" +let publishUrl = getBuildParamOrDefault "packageUrl" "" +let publish = nugetApiKey <> "" && publishUrl <> "" + +//version info let mutable assemblyVersion = "" let mutable nugetVersion = "" let mutable informationalVersion = "" let mutable majorMinorVersion = "" - //Targets Target "Clean" (fun _ -> CleanDirs [artifactsDir] @@ -136,6 +141,9 @@ Target "CreatePackage" (fun _ -> Copyright = copyright OutputPath = nugetOutputDir WorkingDir = "." + PublishUrl = publishUrl + AccessKey = nugetApiKey + Publish = publish }) "AWright18.PipeTo.nuspec" ) diff --git a/ci_build.bat b/ci_build.bat index f19570f..5813f4c 100644 --- a/ci_build.bat +++ b/ci_build.bat @@ -8,5 +8,5 @@ if errorlevel 1 ( exit /b %errorlevel% ) -"packages\FAKE\tools\Fake.exe" build.fsx target="CreatePackage" +"packages\FAKE\tools\Fake.exe" build.fsx target="CreatePackage" apikey=%apikey% packageUrl=%packageUrl% pause \ No newline at end of file