lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [3/3] lucenenet git commit: runbuild.ps1: Added function to update Constants.cs file with the same version that is used as AssemblyInformationalVersion so it doesn't need to be read at runtime.
Date Tue, 11 Apr 2017 18:16:30 GMT
runbuild.ps1: Added function to update Constants.cs file with the same version that is used
as AssemblyInformationalVersion so it doesn't need to be read at runtime.


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

Branch: refs/heads/api-work
Commit: bb1720c16f7e335a7cdb21bf73c689d7bd13beea
Parents: 2dd2fa4
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Apr 12 00:19:39 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Apr 12 00:44:16 2017 +0700

----------------------------------------------------------------------
 runbuild.ps1 | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/bb1720c1/runbuild.ps1
----------------------------------------------------------------------
diff --git a/runbuild.ps1 b/runbuild.ps1
index bb8a5e3..7e556c0 100644
--- a/runbuild.ps1
+++ b/runbuild.ps1
@@ -187,6 +187,13 @@ function Restore-Assembly-Info() {
 	}
 }
 
+function Update-Constants-Version([string]$version) {
+	$constantsFile = "$root\src\Lucene.Net\Util\Constants.cs"
+	(Get-Content $constantsFile) | % {
+		$_-replace "(?<=LUCENE_VERSION\s*?=\s*?"")([^""]*)", $version
+	} | Set-Content $constantsFile -Force
+}
+
 if (Test-Path $ReleaseDirectory) {
 	Write-Host "Removing old build assets..."
 
@@ -206,7 +213,9 @@ function Compile-Projects($projects) {
 			-version $Version `
 			-packageVersion $PackageVersion `
 			-file $AssemblyInfoFile
-	
+
+		Update-Constants-Version $PackageVersion
+
 		foreach ($project in $projects) {
 			pushd $project.DirectoryName
 


Mime
View raw message