forked from luberda-molinet/FFImageLoading
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
72 lines (47 loc) · 2.33 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
os: Visual Studio 2015
configuration: Release
platform: Any CPU
environment:
ANDROID_HOME: C:\android-sdk
AndroidSdkDirectory: C:\android-sdk
# xamarin:
# email: [email protected]
# password:
# secure: SECURE_PASSWORD_HERE
# android: true
# ios: true
build_script:
- cmd: mklink /j %ANDROID_HOME% "C:\Program Files (x86)\Android\android-sdk"
- cmd: echo y | "%ANDROID_HOME%\tools\android.bat" update sdk --no-ui --all --filter platform-tools,tools,android-23,android-19
- cmd: .\MakefileAll.bat
before_build:
- ps: >-
$nuspec1 = "source\Xamarin.FFImageLoading.nuspec"
$nuspec2 = "source\Xamarin.FFImageLoading.Forms.nuspec"
$nuspec3 = "source\Xamarin.FFImageLoading.Transformations.nuspec"
$nuspec4 = "source\Xamarin.FFImageLoading.Svg.nuspec"
$nuspec5 = "source\Xamarin.FFImageLoading.Svg.Forms.nuspec"
$nuspec1template = "source\Xamarin.FFImageLoading.nuspec.template"
$nuspec2template = "source\Xamarin.FFImageLoading.Forms.nuspec.template"
$nuspec3template = "source\Xamarin.FFImageLoading.Transformations.nuspec.template"
$nuspec4template = "source\Xamarin.FFImageLoading.Svg.nuspec.template"
$nuspec5template = "source\Xamarin.FFImageLoading.Svg.Forms.nuspec.template"
$version = $env:appveyor_build_version
$branch = $env:appveyor_repo_branch
$baseversion = $version.SubString(0, $version.LastIndexOf("."))
If ($env:appveyor_repo_tag -ine "true") {
$version = ("{0}-pre-{1}" -f $baseversion, $env:appveyor_build_number)
}
Else {
$version = $baseversion
}
If ($branch -ine "master") {
$version = ("{0}-{1}" -f $version, $branch.Replace("_", "-")).SubString(0, 20)
}
(Get-Content $nuspec1template).replace('@version', $version) | Set-Content $nuspec1
(Get-Content $nuspec2template).replace('@version', $version) | Set-Content $nuspec2
(Get-Content $nuspec3template).replace('@version', $version) | Set-Content $nuspec3
(Get-Content $nuspec4template).replace('@version', $version) | Set-Content $nuspec4
(Get-Content $nuspec5template).replace('@version', $version) | Set-Content $nuspec5
artifacts:
- path: Xamarin.FFImageLoading.*.nupkg