-
Notifications
You must be signed in to change notification settings - Fork 0
/
rb_veyor.yml
110 lines (94 loc) · 4.45 KB
/
rb_veyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# AU template: https://github.com/majkinetor/au-packages-template
#version: '{build}'
max_jobs: 1
image: Visual Studio 2019
# History plugin requires complete log
#clone_depth: 5
branches:
only:
- master
#build:
# verbosity: minimal
environment:
# Set au version to use or omit to use the latest. Specify branch name to use development version from Github
au_version:
au_push: false
au_NoCheckChocoVersion: true
# Force test: use 1 to test all, or N to split testing into N groups
au_test_groups: 1
#Chocolatey version we want to use when checking for updates.
choco_version: '0.10.13'
choco_version_pr: '0.10.10' # Should be kept to the version available one year ago
nupkg_cache_path: C:\packages
init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
- ps: |
$chocoVersion = if (($Env.APPVEYOR_PULL_REQUEST_NUMBER -eq $null) -or ($ENV:APPVEYOR_PULL_REQUEST_NUMBER -eq '')) { $Env:choco_version } else { $Env:choco_version_pr }
if (!(Test-Path "$env:nupkg_cache_path")) { mkdir -Force "$env:nupkg_cache_path" }
@{
'chocolatey' = $chocoVersion
'wormies-au-helpers' = '0.2.1'
}.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') { cup $_.Key --version $_.Value --source ${env:nupkg_cache_path} }
else { cinst $_.Key --version $_.Value --source ${env:nupkg_cache_path} --ignore-dependencies }
}
- 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
. "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version
- ps: |
"Build info"
' {0,-20} {1}' -f 'SCHEDULED BUILD:', ($Env:APPVEYOR_SCHEDULED_BUILD -eq 'true')
' {0,-20} {1}' -f 'FORCED BUILD:' , ($Env:APPVEYOR_FORCED_BUILD -eq 'true')
' {0,-20} {1}' -f 'RE BUILD:' , ($Env:APPVEYOR_RE_BUILD -eq 'true')
# Uncomment the below line if you are using any of the functions from chocolatey-core.extension - https://chocolatey.org/packages/chocolatey-core.extension. Ensure you also have it listed in your package's dependencies
# - cinst chocolatey-core.extension
build_script:
- ps: |
$rbzq = "360ts,chromium,dropbox,flashplayer*,freecad,jre8,malwarebytes,npe,revouninstallerpro,roguekiller,tronscript,windowsrepair,wise*"
$ErrorActionPreference = 'Continue'
if ($Env:APPVEYOR_PROJECT_NAME -like '*test*') { ./test_all.ps1 "random $Env:au_test_groups"; return }
if ( ($Env:APPVEYOR_SCHEDULED_BUILD -ne 'true') -and ($Env:APPVEYOR_FORCED_BUILD -ne 'true') ) {
switch -regex ($Env:APPVEYOR_REPO_COMMIT_MESSAGE)
{
'\[AU (.+?)\]' { $forced = $Matches[1] }
'\[PUSH (.+?)\]' {
$packages = $Matches[1] -split ' '
Write-Host "PUSHING PACKAGES: $packages"
foreach ($package in $packages) {
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
if (Test-Path update.ps1 -ea 0) { ./update.ps1 }
choco pack; Push-Package;
popd
}
return
}
}
}
./update_all.ps1 ad* -chocochk $true
#cd ../automatic/windows10-media-creation-tool
#./update.ps1
#7z a au_temp.zip $Env:TEMP\chocolatey\au\*
7z a AU_Updates_temp.zip $Env:TEMP\AU_Updates\*
7z a All_nupkg_files.zip -r C:\projects\development\packages\*.nupkg
artifacts:
#- path: '**\*.nupkg'
- path: '**\*.zip'
#- path: '**\*.log'
#- path: '**\*.json'
#notifications:
#- provider: Email
# to: $(mail_user)
# on_build_success: false
# on_build_failure: true
# on_build_status_changed: true
on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))