Browse code

PowerShell: fix mixed tabs/spaces

Fixed some mixed/tabs spaces for indentation, and used
tabs for auto-generated Go code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2018/12/23 04:32:31
Showing 2 changed files
... ...
@@ -318,28 +318,26 @@ Try {
318 318
         # Try the internal azure CI image version or Microsoft internal corpnet where the base image is already pre-prepared on the disk,
319 319
         # either through Invoke-DockerCI or, in the case of Azure CI servers, baked into the VHD at the same location.
320 320
         if (Test-Path $("$env:SOURCES_DRIVE`:\baseimages\"+$ControlDaemonBaseImage+".tar")) {
321
-		
322
-			# An optimization for CI servers to copy it to the D: drive which is an SSD.
323
-			if ($env:SOURCES_DRIVE -ne $env:TESTRUN_DRIVE) {
324
-				$readBaseFrom=$env:TESTRUN_DRIVE
325
-				if (!(Test-Path "$env:TESTRUN_DRIVE`:\baseimages")) {
326
-					New-Item "$env:TESTRUN_DRIVE`:\baseimages" -type directory | Out-Null
327
-				}
328
-				if (!(Test-Path "$env:TESTRUN_DRIVE`:\baseimages\windowsservercore.tar")) {
329
-					if (Test-Path "$env:SOURCES_DRIVE`:\baseimages\windowsservercore.tar") {
330
-						Write-Host -ForegroundColor Green "INFO: Optimisation - copying $env:SOURCES_DRIVE`:\baseimages\windowsservercore.tar to $env:TESTRUN_DRIVE`:\baseimages"
331
-						Copy-Item "$env:SOURCES_DRIVE`:\baseimages\windowsservercore.tar" "$env:TESTRUN_DRIVE`:\baseimages"
332
-					}
333
-				}
334
-				if (!(Test-Path "$env:TESTRUN_DRIVE`:\baseimages\nanoserver.tar")) {
335
-					if (Test-Path "$env:SOURCES_DRIVE`:\baseimages\nanoserver.tar") {
336
-						Write-Host -ForegroundColor Green "INFO: Optimisation - copying $env:SOURCES_DRIVE`:\baseimages\nanoserver.tar to $env:TESTRUN_DRIVE`:\baseimages"
337
-						Copy-Item "$env:SOURCES_DRIVE`:\baseimages\nanoserver.tar" "$env:TESTRUN_DRIVE`:\baseimages"
338
-					}
339
-				}
340
-				$readBaseFrom=$env:TESTRUN_DRIVE
341
-			}
342
-		
321
+            # An optimization for CI servers to copy it to the D: drive which is an SSD.
322
+            if ($env:SOURCES_DRIVE -ne $env:TESTRUN_DRIVE) {
323
+                $readBaseFrom=$env:TESTRUN_DRIVE
324
+                if (!(Test-Path "$env:TESTRUN_DRIVE`:\baseimages")) {
325
+                    New-Item "$env:TESTRUN_DRIVE`:\baseimages" -type directory | Out-Null
326
+                }
327
+                if (!(Test-Path "$env:TESTRUN_DRIVE`:\baseimages\windowsservercore.tar")) {
328
+                    if (Test-Path "$env:SOURCES_DRIVE`:\baseimages\windowsservercore.tar") {
329
+                        Write-Host -ForegroundColor Green "INFO: Optimisation - copying $env:SOURCES_DRIVE`:\baseimages\windowsservercore.tar to $env:TESTRUN_DRIVE`:\baseimages"
330
+                        Copy-Item "$env:SOURCES_DRIVE`:\baseimages\windowsservercore.tar" "$env:TESTRUN_DRIVE`:\baseimages"
331
+                    }
332
+                }
333
+                if (!(Test-Path "$env:TESTRUN_DRIVE`:\baseimages\nanoserver.tar")) {
334
+                    if (Test-Path "$env:SOURCES_DRIVE`:\baseimages\nanoserver.tar") {
335
+                        Write-Host -ForegroundColor Green "INFO: Optimisation - copying $env:SOURCES_DRIVE`:\baseimages\nanoserver.tar to $env:TESTRUN_DRIVE`:\baseimages"
336
+                        Copy-Item "$env:SOURCES_DRIVE`:\baseimages\nanoserver.tar" "$env:TESTRUN_DRIVE`:\baseimages"
337
+                    }
338
+                }
339
+                $readBaseFrom=$env:TESTRUN_DRIVE
340
+            }
343 341
             Write-Host  -ForegroundColor Green "INFO: Loading"$ControlDaemonBaseImage".tar from disk. This may take some time..."
344 342
             $ErrorActionPreference = "SilentlyContinue"
345 343
             docker load -i $("$readBaseFrom`:\baseimages\"+$ControlDaemonBaseImage+".tar")
... ...
@@ -962,7 +960,7 @@ Catch [Exception] {
962 962
 }
963 963
 Finally {
964 964
     $ErrorActionPreference="SilentlyContinue"
965
-	$global:ProgressPreference=$origProgressPreference
965
+    $global:ProgressPreference=$origProgressPreference
966 966
     Write-Host  -ForegroundColor Green "INFO: Tidying up at end of run"
967 967
 
968 968
     # Restore the path
... ...
@@ -43,12 +43,12 @@ package dockerversion
43 43
 // Default build-time variable for library-import.
44 44
 // This file is overridden on build with build-time information.
45 45
 const (
46
-    GitCommit             string = "'+$CommitString+'"
47
-    Version               string = "'+$DockerVersion+'"
48
-    BuildTime             string = "'+$buildDateTime+'"
49
-    PlatformName          string = "'+$Platform+'"
50
-    ProductName           string = "'+$Product+'"
51
-    DefaultProductLicense string = "'+$DefaultProductLicense+'"
46
+	GitCommit             string = "'+$CommitString+'"
47
+	Version               string = "'+$DockerVersion+'"
48
+	BuildTime             string = "'+$buildDateTime+'"
49
+	PlatformName          string = "'+$Platform+'"
50
+	ProductName           string = "'+$Product+'"
51
+	DefaultProductLicense string = "'+$DefaultProductLicense+'"
52 52
 )
53 53
 
54 54
 // AUTOGENERATED FILE; see hack\make\.go-autogen.ps1