lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject lucenenet git commit: build/build.ps1: Updated Publish task to zip the result of the publish directory
Date Fri, 20 Oct 2017 16:45:33 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 100ad87e4 -> ffbe9c3f9


build/build.ps1: Updated Publish task to zip the result of the publish directory


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/ffbe9c3f
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/ffbe9c3f
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/ffbe9c3f

Branch: refs/heads/master
Commit: ffbe9c3f90297dfbae11c8a3b1dad475821f46b3
Parents: 100ad87
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Oct 20 23:18:32 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Fri Oct 20 23:18:32 2017 +0700

----------------------------------------------------------------------
 build/build.ps1 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ffbe9c3f/build/build.ps1
----------------------------------------------------------------------
diff --git a/build/build.ps1 b/build/build.ps1
index 4d1137d..081cf03 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -232,9 +232,16 @@ task Publish -depends Pack -description "This task publishes the command
line to
 		Write-Host "Publishing $tool..." -ForegroundColor Magenta
 
 		$toolName = [io.path]::GetFileNameWithoutExtension($tool)
+		$outputDirectory = "$publish_directory\$toolName"
 		Exec {
-			& dotnet.exe publish $tool --configuration $Configuration --output "$publish_directory\$toolName"
+			& dotnet.exe publish $tool --configuration $Configuration --output $outputDirectory
 		}
+
+		# Zip up the result of the publish
+		$outputFile = "$outputDirectory.zip"
+		if (Test-Path $outputFile) { Remove-Item $outputFile }
+		Add-Type -assembly "system.io.compression.filesystem"
+		[io.compression.zipfile]::CreateFromDirectory($outputDirectory, $outputFile)
 	}
 }
 


Mime
View raw message