Skip to content

Commit d464e6c

Browse files
committed
Implement suggestions from chocolatey review
* Added suggested properties to Nuspec * Remove try/catch in the installer scripts * Remove Write-ChocolateyFailure * Update version number in install url
1 parent ad8605e commit d464e6c

3 files changed

Lines changed: 16 additions & 28 deletions

File tree

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
1-
$packageName = 'ColorCat.portable' # arbitrary name for the package, used in messages
2-
$url ="https://github.com/MasterDevs/ColorCat/releases/download/v0.0.2/bin.zip"
1+
$packageName = 'ColorCat.portable' # name for the package, used in messages
2+
$url ="https://github.com/MasterDevs/ColorCat/releases/download/v0.0.4/bin.zip"
33

4-
try
5-
{
6-
$installDir = Join-Path $env:AllUsersProfile "$packageName"
7-
Write-Host "Adding `'$installDir`' to the path and the current shell path"
8-
Install-ChocolateyPath "$installDir"
9-
$env:Path = "$($env:Path);$installDir"
4+
$installDir = Join-Path $env:AllUsersProfile "$packageName"
5+
Write-Host "Adding `'$installDir`' to the path and the current shell path"
6+
Install-ChocolateyPath "$installDir"
7+
$env:Path = "$($env:Path);$installDir"
108

11-
Install-ChocolateyZipPackage "$packageName" "$url" "$installDir"
12-
}
13-
catch
14-
{
15-
Write-ChocolateyFailure "$packageName" "$($_.Exception.Message)"
16-
throw
17-
}
9+
Install-ChocolateyZipPackage "$packageName" "$url" "$installDir"
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
$packageName = 'ColorCat.portable' # arbitrary name for the package, used in messages
1+
$packageName = 'ColorCat.portable' # name for the package, used in messages
22
$zipName = "bin.zip"
33

4-
try
5-
{
6-
$installDir = Join-Path $env:AllUsersProfile "$packageName"
7-
Uninstall-ChocolateyZipPackage "$packageName" "$zipName"
8-
Remove-Item -Recurse -Force "$installDir"
9-
}
10-
catch
11-
{
12-
Write-ChocolateyFailure "$packageName" "$($_.Exception.Message)"
13-
throw
14-
}
4+
$installDir = Join-Path $env:AllUsersProfile "$packageName"
5+
Uninstall-ChocolateyZipPackage "$packageName" "$zipName"
6+
Remove-Item -Recurse -Force "$installDir"

ColorCat/Chocolatey/package.nuspec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@
1212
<tags>console color cat colorize command-line</tags>
1313
<copyright></copyright>
1414
<requireLicenseAcceptance>false</requireLicenseAcceptance>
15-
<releaseNotes></releaseNotes>
15+
<releaseNotes>https://github.com/MasterDevs/ColorCat/releases</releaseNotes>
1616
<licenseUrl> https://github.com/MasterDevs/ColorCat/blob/master/LICENSE </licenseUrl>
1717
<projectUrl> https://github.com/MasterDevs/ColorCat </projectUrl>
18+
<packageSourceUrl> https://github.com/MasterDevs/ColorCat </packageSourceUrl>
19+
<docsUrl>https://github.com/MasterDevs/ColorCat</docsUrl>
20+
<bugTrackerUrl>https://github.com/MasterDevs/ColorCat/issues</bugTrackerUrl>
21+
<projectSourceUrl> https://github.com/MasterDevs/ColorCat </projectSourceUrl>
1822
</metadata>
1923
<files>
2024
<file src="tools\**" target="tools" />

0 commit comments

Comments
 (0)