22# vi: set ft=ruby :
33
44# Setup a global variable to be consistent about xcopy arguments.
5- $xcopyArgs = '/s /q /exclude:c:\\chocoroot\\.xcopyignore /i /y /h'
5+ $xcopyCommand = 'xcopy c:\\chocoroot\\* c:\\code\\choco /s /q /exclude:c:\\chocoroot\\.xcopyignore /i /y /h'
66
77$memory = ENV [ 'VM_MEMORY' ] ? ENV [ 'VM_MEMORY' ] . to_i : 4096
88$cpus = ENV [ 'VM_CPU' ] ? ENV [ 'VM_CPU' ] . to_i : 2
@@ -65,11 +65,11 @@ Vagrant.configure("2") do |config|
6565 config . vm . provision "shell" , name : "clear-build" , inline : <<-CLEARBUILD
6666 Write-Host "($(Get-Date -Format "dddd MM/dd/yyyy HH:mm:ss K")) Clearing the Chocolatey source directory"
6767 Remove-Item -Path C:/code/choco -Recurse -Force -ErrorAction SilentlyContinue
68- xcopy c: \\ chocoroot \\ * c: \\ code \\ choco #{ $xcopyArgs }
68+ #{ $xcopyCommand }
6969 CLEARBUILD
7070
7171 config . vm . provision "shell" , name : "build" , inline : <<-BUILD
72- xcopy c: \\ chocoroot \\ * c: \\ code \\ choco #{ $xcopyArgs }
72+ #{ $xcopyCommand }
7373 Push-Location c:/code/choco
7474 Write-Host "($(Get-Date -Format "dddd MM/dd/yyyy HH:mm:ss K")) Files have been copied, beginning build process."
7575 $CakeOutput = ./build.bat --verbosity=diagnostic --target=CI --testExecutionType=none --shouldRunalyze=false --shouldRunNuGet=false 2>&1
@@ -90,10 +90,9 @@ Vagrant.configure("2") do |config|
9090 CLEARPACKAGES
9191
9292 config . vm . provision "shell" , name : "test" , inline : <<-TEST
93- xcopy c:\\ chocoroot\\ * c:\\ code\\ choco #{ $xcopyArgs}
9493 # Purge any tests files that have been removed.
9594 rm -re -fo c:\\ code\\ choco\\ tests
96- xcopy c: \\ chocoroot \\ tests \\ * c: \\ code \\ choco \\ tests #{ $xcopyArgs }
95+ #{ $xcopyCommand }
9796 Write-Host "($(Get-Date -Format "dddd MM/dd/yyyy HH:mm:ss K")) Starting Test Execution"
9897 Push-Location c:/code/choco
9998 # $env:TEST_KITCHEN = 1
0 commit comments