forked from Kromtec/LegendsViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
64 lines (49 loc) · 1.9 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
# version format
# {major_release}.{feature_release}.{minor_release}.{build}
version: 1.20.08.{build}
branches:
only:
- master
- develop
image: Visual Studio 2019
before_build:
- where msbuild
- nuget restore
build:
project: LegendsViewer.sln # path to Visual Studio solution or project
verbosity: minimal # quiet|minimal|normal|detailed
# Operating system (build VM template)
#os: Windows Server 2012
# msbuild settings
#platform: AnyCPU
configuration: Release
# to disable automatic tests
#test: off
# enable patching of AssemblyInfo.* files
assembly_info:
patch: true
file: AssemblyInfo.*
assembly_version: "{version}"
assembly_file_version: "{version}"
assembly_informational_version: "{version}"
# to run auto tests
#tests:
#######################
# HOOKS
# on successful build
on_success:
- ps: |
$baseFolder = "$($env:APPVEYOR_BUILD_FOLDER)\LegendsViewer\bin\"
$buildFolder = join-path $baseFolder "Release"
$dropFolder = (New-Item -Path "$($baseFolder)\Output" -ItemType "directory").FullName
Get-ChildItem "$($buildFolder)\*.exe", "$($buildFolder)\*.dll" | Copy-Item -Destination "$($dropFolder)"
Copy-Item "$($buildFolder)\WebContent" "$($dropFolder)\WebContent" -Recurse
$deploymentName = "$($env:APPVEYOR_BUILD_VERSION) $($env:APPVEYOR_REPO_BRANCH)"
$releaseVersion = ($env:APPVEYOR_BUILD_VERSION).Replace($env:APPVEYOR_BUILD_NUMBER, "").Trim(".")
$zipName = "LegendsViewer-$($releaseVersion).zip"
[Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem");
[System.IO.Compression.ZipFile]::CreateFromDirectory("$($dropFolder)", "$($baseFolder)\$zipName", [System.IO.Compression.CompressionLevel]::Optimal, $false);
Push-AppveyorArtifact "$($baseFolder)\$zipName" -FileName $zipName -DeploymentName $deploymentName
#######################
# to disable deployment
deploy: off