lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject lucenenet git commit: runbuild.ps1 - Added checks to ensure backup files exist before restoring them
Date Wed, 05 Apr 2017 06:44:58 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/api-work e548d84e7 -> 014c15f85


runbuild.ps1 - Added checks to ensure backup files exist before restoring them


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

Branch: refs/heads/api-work
Commit: 014c15f85edfe0e764768fe455854b2beb13b2b5
Parents: e548d84
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Apr 5 13:40:44 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Apr 5 13:40:44 2017 +0700

----------------------------------------------------------------------
 runbuild.ps1 | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/014c15f8/runbuild.ps1
----------------------------------------------------------------------
diff --git a/runbuild.ps1 b/runbuild.ps1
index 92dc031..8827012 100644
--- a/runbuild.ps1
+++ b/runbuild.ps1
@@ -194,10 +194,11 @@ function Backup-Assembly-Info() {
 }
 
 function Restore-Assembly-Info() {
-	Move-Item "$AssemblyInfoFile.bak" $AssemblyInfoFile -Force
+	if (Test-Path "$AssemblyInfoFile.bak") {
+		Move-Item "$AssemblyInfoFile.bak" $AssemblyInfoFile -Force
+	}
 }
 
-
 if (Test-Path $ReleaseDirectory) {
 	Write-Host "Removing old build assets..."
 
@@ -432,7 +433,9 @@ try {
 } finally {
 	#Restore the project.json files
 	foreach ($projectJson in $projectJsons) {
-		Move-Item "$projectJson.bak" $projectJson -Force
+		if (Test-Path "$projectJson.bak") {
+			Move-Item "$projectJson.bak" $projectJson -Force
+		}
 	}
 }
 


Mime
View raw message