File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 99 [string []]$ScriptArgs
1010)
1111
12- # create cake directory
12+ # delete cake directory if script changed
1313$CakeDirPath = Join-Path $PSScriptRoot " cake"
14+ $PackagesConfigPath = Join-Path $CakeDirPath " packages.config"
15+ If ((Test-Path $PackagesConfigPath ) -and ((Get-Item (Join-Path $PSScriptRoot " build.cake" )).LastWriteTime -gt (Get-Item ($PackagesConfigPath )).LastWriteTime)) {
16+ Write-Host " Cake script changed; rebuilding cake directory."
17+ Remove-Item $CakeDirPath - Force - Recurse
18+ }
19+
20+ # create cake directory
1421New-Item - Path $CakeDirPath - Type Directory - ErrorAction SilentlyContinue | Out-Null
1522
1623# create packages.config
17- $PackagesConfigPath = Join-Path $CakeDirPath " packages.config"
1824If (! (Test-Path $PackagesConfigPath )) {
1925 [System.IO.File ]::WriteAllLines($PackagesConfigPath , @ (
2026 " <?xml version=`" 1.0`" encoding=`" utf-8`" ?>" ,
2127 " <packages>" ,
22- " `t <package id=`" Cake`" version=`" 0.14 .0`" />" ,
28+ " `t <package id=`" Cake`" version=`" 0.17 .0`" />" ,
2329 " </packages>" ))
2430}
2531
You can’t perform that action at this time.
0 commit comments