This repository was archived by the owner on Jun 25, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ function CreatePackage($versionInfos)
9696 Copy-Item $tools \chocolatey\Pretzel\pretzel.nuspec chocoTemp\Pretzel\pretzel.nuspec
9797 Copy-Item $tools \chocolatey\Pretzel\chocolateyInstall.ps1 chocoTemp\Pretzel\tools\chocolateyInstall.ps1
9898 Copy-Item $tools \chocolatey\Pretzel\chocolateyUninstall.ps1 chocoTemp\Pretzel\tools\chocolateyUninstall.ps1
99+ Copy-Item $tools \chocolatey\Pretzel\chocolateyBeforeModify.ps1 chocoTemp\Pretzel\tools\chocolateyBeforeModify.ps1
99100
100101 ReplaceChocoInstInfos chocoTemp\Pretzel\tools\chocolateyInstall.ps1 $version $tag $artifacts \Pretzel.$version.zip
101102
Original file line number Diff line number Diff line change 1+ Write-Debug " Migrate Pretzel from BinRoot to normal Chocolatey directory"
2+
3+ $binRoot = Get-BinRoot
4+ $installDir = Join-Path $binRoot " Pretzel"
5+
6+ # Remove folder
7+ If (Test-Path $installDir ){
8+ Remove-Item $installDir - Recurse
9+ }
10+
11+ # Remove path
12+
13+ # get the PATH variable
14+ $envPath = $env: PATH
15+ $pathType = [System.EnvironmentVariableTarget ]::User
16+
17+ if ($envPath.ToLower ().Contains($installDir.ToLower ()))
18+ {
19+ $statementTerminator = " ;"
20+ Write-Debug " PATH environment variable contains old pretzel path $installDir . Removing..."
21+ $actualPath = [System.Collections.ArrayList ](Get-EnvironmentVariable - Name ' Path' - Scope $pathType ).split($statementTerminator )
22+
23+ $actualPath.Remove ($installDir )
24+ $newPath = $actualPath -Join $statementTerminator
25+
26+ Set-EnvironmentVariable - Name ' Path' - Value $newPath - Scope $pathType
27+
28+ } else {
29+ Write-Debug " The path to uninstall `' $installDir `' was not found in the `' $pathType `' PATH. Could not remove."
30+ }
Original file line number Diff line number Diff line change 1313 <description >A simple, pluggable site generation tool for .NET developers and Windows users</description >
1414 <tags >Jekyll Liquid Razor Markdown blog hmtl static site engine</tags >
1515 <releaseNotes >https://github.com/Code52/pretzel/releases</releaseNotes >
16+ <dependencies >
17+ <dependency id =" chocolatey" version =" 0.9.10" />
18+ </dependencies >
1619 </metadata >
1720</package >
You can’t perform that action at this time.
0 commit comments