forked from chocolatey/ChocolateyGUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/2.0.0: (61 commits) (maint) Update to latest Chocolatey NuGet package (maint) Update to latest Chocolatey package (build) Re-enable release notes export (maint) Added copyright to nuspec file (build) Updated GRM config file (maint) Update to released beta packages (maint) Switch from int to long (maint) Update to latest beta Chocolatey packages (maint) Remove @everyone from Discord notification (maint) Bump to beta package in nuspec (maint) Update to latest beta Chocolatey packages (build) Update to latest Chocolatey.Cake.Recipe (build) Remove unnecessary configuration (build) Add notification templates (maint) Prevent download of relase notes (chocolatey#974) Update to released beta packages (chocolatey#974) Update to beta packages for Chocolatey (chocolatey#989) Remove usage of side by side (chocolatey#990) Fix usage of ListCommand (chocolatey#974) Update to latest alpha package ...
- Loading branch information
Showing
52 changed files
with
541 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
We have just released v{0} of the Chocolatey GUI! | ||
|
||
Release notes can be found here: | ||
|
||
https://docs.chocolatey.org/en-us/chocolatey-gui/release-notes#{1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
We have just released v{0} of the Chocolatey GUI! Release notes can be found here: https://docs.chocolatey.org/en-us/chocolatey-gui/release-notes#{1}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@channel We have just released v{0} of the Chocolatey GUI! | ||
|
||
Release notes can be found here: | ||
|
||
https://docs.chocolatey.org/en-us/chocolatey-gui/release-notes#{1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
We have just released v{0} of the Chocolatey GUI! | ||
|
||
Release notes can be found here: | ||
|
||
https://docs.chocolatey.org/en-us/chocolatey-gui/release-notes#{1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
- {{ issue.title }} - see [#{{ issue.number }}]({{ issue.html_url }}) | ||
- {{ issue.title }} - see [#{{ issue.number }}]({{ issue.html_url }}). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
[CmdletBinding(DefaultParameterSetName = "tag")] | ||
param( | ||
# The location where Chocolatey CLI sources are located, | ||
# or will be located if the directory does not already exist. | ||
# If not specified and the environment variable `CHOCO_SOURCE_LOCATION` | ||
# is not definied, the location will default to `$env:TEMP\ | ||
[Alias("ChocoLocation")] | ||
[string] $ChocoSourceLocation = $env:CHOCO_SOURCE_LOCATION, | ||
|
||
# Checkout a specific tag of your own choosing. | ||
# This value can also be a specific commit or a branch, but | ||
# will be notified as being a tag. | ||
# NOTE: Only tags already pulled down will be considered. | ||
[Parameter(ParameterSetName = "tag")] | ||
[string] $CheckoutTag = $null, | ||
|
||
# Checkout the latest tag available in the Chocolatey Source Location. | ||
# NOTE: Only tags already pulled down will be considered. | ||
[Parameter(ParameterSetName = "latest")] | ||
[switch] $CheckoutLatestTag, | ||
|
||
# Try check out a tage with the same name as what is used as a reference | ||
# in the packages.config file. If the reference specified is not a stable | ||
# version, the latest tag will be checked out instead. | ||
# NOTE: Only tags already pulled down will be considered. | ||
[Parameter(ParameterSetName = 'ref-tag')] | ||
[switch] $CheckoutRefTag, | ||
|
||
# Remove and clone the specified Chocolatey Source Location again. | ||
# This is a very destructive operation, and should only be used if | ||
# you are not interested in any local information. | ||
[switch] $ForceChocoClone | ||
) | ||
|
||
function CheckoutTag { | ||
param( | ||
[Parameter(Mandatory)] | ||
[string] $SourceLocation, | ||
|
||
[string] $TagName | ||
) | ||
|
||
Push-Location "$SourceLocation" | ||
if (!$TagName) { | ||
$TagName = . git tag --sort v:refname | Where-Object { $_ -match "^[\d\.]+$" } | Select-Object -last 1 | ||
} | ||
|
||
if ($TagName) { | ||
git checkout $TagName -q 2>$null | ||
if ($LASTEXITCODE -eq 0) { | ||
Write-Host "Checked out Chocolatey CLI tag '$TagName'" | ||
} | ||
else { | ||
$currentBranch = . git branch --show-current | ||
if ($currentBranch) { | ||
Write-Warning "Unable to check out tag $TagName. Leaving source in branch $currentBranch" | ||
} | ||
else { | ||
Write-Warning "Unable to check out tag $TagName. Leaving source in commit $(git rev-parse HEAD)" | ||
} | ||
} | ||
} | ||
|
||
Pop-Location | ||
} | ||
|
||
Write-Host "We are at $PSScriptRoot" | ||
|
||
[xml]$packagesConfigFile = Get-Content -Path "$PSScriptRoot/Source/ChocolateyGui/packages.config" | ||
|
||
$chocolateyLibPackageVersion = $($packagesConfigFile.packages.package | Where-Object { $_.id -eq "chocolatey.lib" }).version | ||
|
||
if ($CheckoutRefTag) { | ||
|
||
if ($chocolateyLibPackageVersion -match '^[\d\.]+$') { | ||
$CheckoutTag = $chocolateyLibPackageVersion | ||
} | ||
else { | ||
$CheckoutLatestTag = $true | ||
} | ||
} | ||
|
||
if (!$ChocoSourceLocation) { | ||
# To allow a default path being used for cloning the repository | ||
$ChocoSourceLocation = "$env:TEMP\chocoSource" | ||
} | ||
|
||
Write-Host "Looking for choco in '$ChocoSourceLocation'" | ||
|
||
if ($ForceChocoClone -and (Test-Path $ChocoSourceLocation)) { | ||
Write-Host "Removing existing Chocolatey CLI Source in '$ChocoSourceLocation'" | ||
# We use error action stop here, as there may be times the `.git` directory is locked. | ||
# Having information about this is helpful to rectify the issue. | ||
Remove-Item $ChocoSourceLocation -Recurse -Force -EA Stop | ||
} | ||
|
||
if (!(Test-Path $ChocoSourceLocation)) { | ||
Write-Host "Cloning Chocolatey CLI Repository to '$ChocoSourceLocation'" | ||
git clone "https://github.com/chocolatey/choco.git" "$ChocoSourceLocation" | ||
|
||
if ($CheckoutLatestTag) { | ||
CheckoutTag $ChocoSourceLocation | ||
} | ||
elseif ($CheckoutTag) { | ||
CheckoutTag $ChocoSourceLocation -TagName $CheckoutTag | ||
} | ||
} | ||
elseif ($CheckoutLatestTag) { | ||
CheckoutTag $ChocoSourceLocation | ||
} | ||
elseif ($CheckoutTag) { | ||
CheckoutTag $ChocoSourceLocation -TagName $CheckoutTag | ||
} | ||
|
||
if (-not (Test-Path -Path $ChocoSourceLocation)) { | ||
# We leave this here on purpose in case the cloning of the repository has failed. | ||
throw "Location '$ChocoSourceLocation' not found; please rerun with the -ChocoSourceLocation parameter or set the CHOCO_SOURCE_LOCATION environment variable." | ||
} | ||
|
||
Write-Host "Restore packages on project first..." | ||
& ./build.debug.bat --target='Restore' | ||
|
||
Write-Host "Building choco at $ChocoSourceLocation with Debug..." | ||
|
||
Push-Location $ChocoSourceLocation | ||
if (Test-Path "recipe.cake") { | ||
& ./build.debug.bat --target='Build' | ||
& ./build.debug.bat --target='Run-ILMerge' --exclusive | ||
} | ||
else { | ||
& ./build.debug.bat | ||
} | ||
Pop-Location | ||
|
||
Write-Host "Copying chocolatey artifacts to current Chocolatey Package Version folder..." | ||
|
||
$chocolateyLibPackageFolder = "$PSScriptRoot/Source/packages/chocolatey.lib.$chocolateyLibPackageVersion/lib/net48" | ||
|
||
if (-not (Test-Path -Path $chocolateyLibPackageFolder)) { | ||
New-Item -ItemType Directory -Path $chocolateyLibPackageFolder > $null | ||
} | ||
|
||
$codeDropLibs = "$ChocoSourceLocation/code_drop/temp/_PublishedLibs/chocolatey_merged" | ||
|
||
if (!(Test-Path $codeDropLibs)) { | ||
$codeDropLibs = "$ChocoSourceLocation/code_drop/chocolatey/lib" | ||
} | ||
|
||
Write-Host "Copying chocolatey lib items from '$codeDropLibs/*' to '$chocolateyLibPackageFolder'." | ||
Copy-Item -Path "$codeDropLibs/*" -Destination "$chocolateyLibPackageFolder/" -Force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
next-version: 1.0.0 | ||
next-version: 2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.