forked from Shywim/chocolatey-packages
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.appveyor.yml
87 lines (72 loc) · 2.65 KB
/
.appveyor.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
version: '{build}'
max_jobs: 1
image: WMF 5
branches:
only:
- master
environment:
au_version:
au_push: true
au_test_groups: 1
github_user_repo: Shywim/chocolatey-packages
github_api_key:
secure: lnJ1oAR4Kby9jIDHUu1tSpEuwckLC+6wZJeCgohoInqNTjNm4xOq4xPiWNmdzrkQ
mail_user: [email protected]
mail_pass:
secure: /P17jJ0uSyTP1UOGcAkI7A==
mail_server: smtp.gmail.com
mail_port: 587
mail_enablessl: true
gist_id: 5c485c72248516c4437d4f6821206fb3
gist_id_test: 45d3116b8ee814d02a399a369d439364
api_key:
secure: XdK3FphGNR+i0KIK6fHmYc3YnDkr6nO0KIJUWyORZxM5Xnp1fP8sDfD6w7AuHX+X
init:
- git config --global user.email "[email protected]"
- git config --global user.name "Matthieu Harlé"
- git config --global core.safecrlf false
install:
- ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version'
- ps: $PSVersionTable
- git --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')
build_script:
- ps: |
$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; choco pack; Push-Package; popd
}
return
}
}
}
./update_all.ps1 -ForcedPackages $forced
7z a au_temp.zip $Env:TEMP\chocolatey\au\*
artifacts:
- path: update_info.xml
- path: Update-AUPackages.md
- path: au_temp.zip
notifications:
- provider: Email
to: $(mail_user)
on_build_success: false
on_build_failure: true
on_build_status_changed: true