lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [4/4] lucenenet git commit: build/build.ps1: Added Publish task for the command line tools.
Date Sun, 17 Sep 2017 13:19:08 GMT
build/build.ps1: Added Publish task for the command line tools.


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

Branch: refs/heads/master
Commit: 537055a7360efe56413d44f9a9957d2c70b73a74
Parents: bc26b5c
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Sep 17 20:01:02 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Sep 17 20:18:07 2017 +0700

----------------------------------------------------------------------
 build/build.ps1 | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/537055a7/build/build.ps1
----------------------------------------------------------------------
diff --git a/build/build.ps1 b/build/build.ps1
index 054ea52..205aeaa 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -24,6 +24,7 @@ properties {
 	[string]$tools_directory  = "$base_directory\lib"
 	[string]$nuget_package_directory = "$release_directory\NuGetPackages"
 	[string]$test_results_directory = "$release_directory\TestResults"
+	[string]$publish_directory = "$release_directory\Publish"
 	[string]$solutionFile = "$base_directory\Lucene.Net.sln"
 	[string]$versionFile = "$base_directory\Version.proj"
 	[string]$sdkPath = "$env:programfiles/dotnet/sdk"
@@ -52,7 +53,7 @@ properties {
 
 $backedUpFiles = New-Object System.Collections.ArrayList
 
-task default -depends Pack
+task default -depends Publish
 
 task Clean -description "This task cleans up the build directory" {
 	Write-Host "##teamcity[progressMessage 'Cleaning']"
@@ -212,6 +213,29 @@ task Pack -depends Compile -description "This task creates the NuGet
packages" {
 	}
 }
 
+task Publish -depends Pack -description "This task publishes the command line tools" {
+	Write-Host "##teamcity[progressMessage 'Publishing']"
+	#create the publish output directory
+	Ensure-Directory-Exists "$publish_directory"
+
+	pushd $base_directory
+	$tools = Get-ChildItem -Path "$source_directory\**\*.csproj" -Recurse | ? {
+		$_.Directory.FullName.Contains("\tools\") -or $_.Directory.FullName.Contains("/tools/")
-and 
+		!$_.Directory.Name.Contains(".Test") -and
+		!$_.Directory.Name.Contains("JavaDocToMarkdownConverter")
+	}
+	popd
+
+	foreach ($tool in $tools) {
+		Write-Host "Publishing $tool..." -ForegroundColor Magenta
+
+		$toolName = [io.path]::GetFileNameWithoutExtension($tool)
+		Exec {
+			& dotnet.exe publish $tool --configuration $Configuration --output "$publish_directory\$toolName"
+		}
+	}
+}
+
 task Test -depends InstallSDK1IfRequired, InstallSDK2IfRequired, Restore -description "This
task runs the tests" {
 	Write-Host "##teamcity[progressMessage 'Testing']"
 	Write-Host "Running tests..." -ForegroundColor DarkCyan


Mime
View raw message