File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 9
9
[string []]$ScriptArgs
10
10
)
11
11
12
- # create cake directory
12
+ # delete cake directory if script changed
13
13
$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
14
21
New-Item - Path $CakeDirPath - Type Directory - ErrorAction SilentlyContinue | Out-Null
15
22
16
23
# create packages.config
17
- $PackagesConfigPath = Join-Path $CakeDirPath " packages.config"
18
24
If (! (Test-Path $PackagesConfigPath )) {
19
25
[System.IO.File ]::WriteAllLines($PackagesConfigPath , @ (
20
26
" <?xml version=`" 1.0`" encoding=`" utf-8`" ?>" ,
21
27
" <packages>" ,
22
- " `t <package id=`" Cake`" version=`" 0.14 .0`" />" ,
28
+ " `t <package id=`" Cake`" version=`" 0.17 .0`" />" ,
23
29
" </packages>" ))
24
30
}
25
31
You can’t perform that action at this time.
0 commit comments