-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: migrate from au to chocolatey-au
- Loading branch information
Showing
14 changed files
with
182 additions
and
2,983 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 |
---|---|---|
@@ -1,13 +1,11 @@ | ||
# AU template: https://github.com/majkinetor/au-packages-template | ||
|
||
version: '{build}' | ||
max_jobs: 1 | ||
image: WMF 5 | ||
image: Visual Studio 2022 | ||
# History plugin requires complete log | ||
clone_depth: 5 | ||
branches: | ||
only: | ||
- master | ||
- master | ||
# build: | ||
# verbosity: minimal | ||
|
||
|
@@ -44,16 +42,32 @@ environment: | |
secure: U6n1Xfo0lhitmK8PZNHK3q3Dxhz/akc1Im1iotq0JUHgRQ6vao19btvE+lAz3Mmi # https://ci.appveyor.com/tools/encrypt | ||
|
||
init: | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "tnc1997" | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "Chocolatey-AU" | ||
- git config --global core.safecrlf false | ||
|
||
install: | ||
- ps: | | ||
$chocoVersion = $Env:choco_version | ||
if (!(Test-Path "$env:nupkg_cache_path")) { mkdir -Force "$env:nupkg_cache_path" } | ||
@{ | ||
'chocolatey' = $chocoVersion | ||
# Uncomment and input the version if you are using any of these in AU scripts | ||
# 'wormies-au-helpers' = 'VERSION_HERE' | ||
# 'chocolatey-core.extension' = 'VERSION_HERE' | ||
# 'autohotkey.install' = 'VERSION_HERE' | ||
}.GetEnumerator() | % { | ||
if (!(Test-Path "${env:nupkg_cache_path}\$($_.Key).$($_.Value).nupkg")) { rm "${env:nupkg_cache_path}\$($_.Key).*.nupkg" ; iwr "https://chocolatey.org/api/v2/package/$($_.Key)/$($_.Value)" -OutFile "${env:nupkg_cache_path}\$($_.Key).$($_.Value).nupkg" } | ||
if ($_.Key -eq 'chocolatey') { choco upgrade $_.Key --version $_.Value --source ${env:nupkg_cache_path} --allow-downgrade --pre } | ||
else { choco install $_.Key --version $_.Value --source ${env:nupkg_cache_path} --ignore-dependencies } | ||
} | ||
rm "$env:ChocolateyInstall\logs\*.log" | ||
- ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version' | ||
- ps: $PSVersionTable | ||
- git --version | ||
- choco --version | ||
- ps: | | ||
git clone -q https://github.com/majkinetor/au.git $Env:TEMP/au | ||
git clone -q https://github.com/chocolatey-community/chocolatey-au.git $Env:TEMP/au | ||
. "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version | ||
- ps: | | ||
|
@@ -80,7 +94,10 @@ build_script: | |
Write-Host ("{0}`n{1}`n" -f ('-'*60), "PACKAGE: $package") | ||
$package_dir = ls -recurse | ? { $_.Name -eq "$package.nuspec"} | select -First 1 | % Directory | ||
if (!$package_dir) { Write-Warning "Can't find package '$package'"; continue } | ||
pushd $package_dir; choco pack; Push-Package; popd | ||
pushd $package_dir | ||
if (Test-Path update.ps1 -ea 0) { ./update.ps1 } | ||
choco pack; Push-Package; | ||
popd | ||
} | ||
return | ||
} | ||
|
@@ -102,5 +119,8 @@ notifications: | |
on_build_failure: true | ||
on_build_status_changed: true | ||
|
||
cache: | ||
- '%nupkg_cache_path% -> .appveyor.yml' | ||
|
||
# on_finish: | ||
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) |
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,27 +1,11 @@ | ||
## Automatic Folder | ||
|
||
This is where you put your Chocolatey packages that are automatically packaged up by either [AU](https://chocolatey.org/packages/au) or [Ketarin](https://chocolatey.org/packages/ketarin)/[ChocolateyPackageUpdater](https://chocolatey.org/packages/chocolateypackageupdater). | ||
This is where you put your Chocolatey packages that are automatically packaged up by [chocolatey-au](https://github.com/chocolatey-community/chocolatey-au). | ||
|
||
### Ketarin / ChocolateyPackageUpdater (chocopkgup) | ||
Execute `update_all.ps1` in the repository root to run [chocolatey-au](https://github.com/chocolatey-community/chocolatey-au) updater with default options. | ||
|
||
You want to drop the actual Ketarin files (job file exports) in the top-level ketarin folder to keep them separate from the packages themselves. | ||
To fully setup all the features ensure you perform the steps in the [setup/README.md](https://github.com/chocolatey/chocolatey-packages-template/blob/master/setup/README.md) | ||
|
||
The following packages implement this strategy of auto updates: | ||
|
||
* 1password | ||
* git.install | ||
|
||
There is also an _output folder where the automatic packaging files with tokens to do token replacment and output package files with actual values in this folder. This folder is necessary for chocopkgup to do its work. You can decide whether to commit this set of folders or not. We recommend committing it as it makes it easier to do one off fixes and contributors to submit fixes for a package. | ||
|
||
### Automatic Updater (AU) | ||
|
||
AU works with packages without automatic package tokens necessary. So you can treat the packages as normal. | ||
|
||
Execute `update_all.ps1` in the repository root to run [AU](https://chocolatey.org/packages/au) updater with default options. | ||
|
||
To fully setup all the features ensure you perform the steps in the [setup/README.md](https://github.com/chocolatey/chocolatey-packages-template/blob/master/setup/README.md#automatic-updater-au) | ||
|
||
To get the packages that implement AU updater run `Get-AUPackages` or `lsau` in this directory. | ||
|
||
**NOTE:** Ensure when you are creating packages for AU, you don't use `--auto` as the packaging files should be normal packages. AU doesn't need the tokens to do replacement. | ||
To get the packages that implement chocolatey-au updater run `Get-AUPackages` or `lsau` in this directory. | ||
|
||
**NOTE:** Ensure when you are creating packages for chocolatey-au, you don't use `--auto` as the packaging files should be normal packages. chocolatey-au doesn't need the tokens to do replacement. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.