-
Notifications
You must be signed in to change notification settings - Fork 2
/
appveyor.yml
140 lines (110 loc) · 7.19 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
version: 3.0.{build}
image:
- Visual Studio 2022
- Ubuntu2004
- macos
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
build_script:
- ps: >-
dotnet --info
if($isWindows)
{
# CLI version
# -----------
dotnet publish SerialDiskCLI/SerialDiskCLI.csproj -r win-x64 -c Release --self-contained true --output ./bin/Release/CLI/SCE/win-x64 /p:PublishTrimmed=true /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true
dotnet publish SerialDiskCLI/SerialDiskCLI.csproj -r win-x86 -c Release --self-contained true --output ./bin/Release/CLI/SCE/win-x86 /p:PublishTrimmed=true /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true
# UI version
# ----------
dotnet publish SerialDiskUI/SerialDiskUI.csproj -r win-x64 -c Release --self-contained true --output ./bin/Release/UI/SCE/win-x64 /p:PublishTrimmed=true /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true
dotnet publish SerialDiskUI/SerialDiskUI.csproj -r win-x86 -c Release --self-contained true --output ./bin/Release/UI/SCE/win-x86 /p:PublishTrimmed=true /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true
}
elseif($isLinux)
{
# CLI version
# -----------
dotnet publish SerialDiskCLI/SerialDiskCLI.csproj -r linux-x64 -c Release --self-contained true --output ./bin/Release/CLI/SCE/serialdisk-linux-x64 /p:PublishTrimmed=true /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true
dotnet publish SerialDiskCLI/SerialDiskCLI.csproj -r linux-arm64 -c Release --self-contained true --output ./bin/Release/CLI/SCE/serialdisk-linux-arm64 /p:PublishTrimmed=true /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true
dotnet publish SerialDiskCLI/SerialDiskCLI.csproj -r linux-arm -c Release --self-contained true --output ./bin/Release/CLI/SCE/serialdisk-linux-arm32 /p:PublishTrimmed=true /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true
# UI version
# ----------
dotnet publish SerialDiskUI/SerialDiskUI.csproj -r linux-x64 -c Release --self-contained true --output ./bin/Release/UI/SCE/serialdisk-linux-x64 /p:PublishTrimmed=true /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true
dotnet publish SerialDiskUI/SerialDiskUI.csproj -r linux-arm64 -c Release --self-contained true --output ./bin/Release/UI/SCE/serialdisk-linux-arm64 /p:PublishTrimmed=true /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true
dotnet publish SerialDiskUI/SerialDiskUI.csproj -r linux-arm -c Release --self-contained true --output ./bin/Release/UI/SCE/serialdisk-linux-arm32 /p:PublishTrimmed=true /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true
}
else
{
# CLI version
# -----------
dotnet publish SerialDiskCLI/SerialDiskCLI.csproj -r osx-x64 -c Release --self-contained true --output ./bin/Release/CLI/SCE/serialdisk-macos-x64 /p:PublishTrimmed=true /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true
# UI version
# ----------
dotnet publish SerialDiskUI/SerialDiskUI.csproj -r osx-x64 -c Release --self-contained true --output ./bin/Release/UI/SCE/serialdisk-macos-x64 /p:PublishTrimmed=true /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true
}
on_success:
- ps: >-
$versionNo = "3.0"
if($isWindows)
{
# CLI version
7z a -mx=9 serialdisk_$($versionNo)_cli_win-x64.zip ./bin/Release/CLI/SCE/win-x64/*
appveyor PushArtifact serialdisk_$($versionNo)_cli_win-x64.zip
7z a -mx=9 serialdisk_$($versionNo)_cli_win-x86.zip ./bin/Release/CLI/SCE/win-x86/*
appveyor PushArtifact serialdisk_$($versionNo)_cli_win-x86.zip
# UI Version
7z a -mx=9 serialdisk_$($versionNo)_ui_win-x64.zip ./bin/Release/UI/SCE/win-x64/*
appveyor PushArtifact serialdisk_$($versionNo)_ui_win-x64.zip
7z a -mx=9 serialdisk_$($versionNo)_ui_win-x86.zip ./bin/Release/UI/SCE/win-x86/*
appveyor PushArtifact serialdisk_$($versionNo)_ui_win-x86.zip
}
elseif($isLinux)
{
# CLI version
tar -czf serialdisk_$($versionNo)_cli_linux-x64.tar.gz -C ./bin/Release/CLI/SCE serialdisk-linux-x64
appveyor PushArtifact serialdisk_$($versionNo)_cli_linux-x64.tar.gz
tar -czf serialdisk_$($versionNo)_cli_linux-arm64.tar.gz -C ./bin/Release/CLI/SCE serialdisk-linux-arm64
appveyor PushArtifact serialdisk_$($versionNo)_cli_linux-arm64.tar.gz
tar -czf serialdisk_$($versionNo)_cli_linux-arm32.tar.gz -C ./bin/Release/CLI/SCE serialdisk-linux-arm32
appveyor PushArtifact serialdisk_$($versionNo)_cli_linux-arm32.tar.gz
# UI Version
tar -czf serialdisk_$($versionNo)_ui_linux-x64.tar.gz -C ./bin/Release/UI/SCE serialdisk-linux-x64
appveyor PushArtifact serialdisk_$($versionNo)_ui_linux-x64.tar.gz
tar -czf serialdisk_$($versionNo)_ui_linux-arm64.tar.gz -C ./bin/Release/UI/SCE serialdisk-linux-arm64
appveyor PushArtifact serialdisk_$($versionNo)_ui_linux-arm64.tar.gz
tar -czf serialdisk_$($versionNo)_ui_linux-arm32.tar.gz -C ./bin/Release/UI/SCE serialdisk-linux-arm32
appveyor PushArtifact serialdisk_$($versionNo)_ui_linux-arm32.tar.gz
}
else
{
# CLI version
tar -czf serialdisk_$($versionNo)_cli_macos-x64.tar.gz -C ./bin/Release/CLI/SCE serialdisk-macos-x64
appveyor PushArtifact serialdisk_$($versionNo)_cli_macos-x64.tar.gz
# UI app bundle
$APP_NAME="SerialDisk.app"
$BUNDLE_DIRECTORY="./macOS-bundle"
$PUBLISH_OUTPUT_DIRECTORY="./bin/Release/UI/SCE/serialdisk-macos-x64/."
$INFO_PLIST="./SerialDiskUI/Assets/macOS-build/Info.plist"
$ICON_FILE="./SerialDiskUI/Assets/macOS-build/SerialDisk.icns"
New-Item -Path "$BUNDLE_DIRECTORY/$APP_NAME/Contents/MacOS" -ItemType "directory"
New-Item -Path "$BUNDLE_DIRECTORY/$APP_NAME/Contents/Resources" -ItemType "directory"
Copy-Item -Path "$INFO_PLIST" -Destination "$BUNDLE_DIRECTORY/$APP_NAME/Contents"
Copy-Item -Path "$ICON_FILE" -Destination "$BUNDLE_DIRECTORY/$APP_NAME/Contents/Resources"
Copy-Item -Path "$PUBLISH_OUTPUT_DIRECTORY/*" -Destination "$BUNDLE_DIRECTORY/$APP_NAME/Contents/MacOS" -Recurse
# Symlink to Applications folder
ln -s "/Applications" "$BUNDLE_DIRECTORY/Applications"
# UI dmg
hdiutil create SerialDiskUncompressed.dmg -volname "SerialDisk $versionNo" -fs HFS+ -srcfolder $BUNDLE_DIRECTORY
hdiutil convert SerialDiskUncompressed.dmg -format ULMO -o serialdisk_$($versionNo)_ui_macos-x64.dmg
appveyor PushArtifact serialdisk_$($versionNo)_ui_macos-x64.dmg
}
test_script:
- ps: >-
dotnet clean
dotnet test --test-adapter-path:. --logger:Appveyor -nodereuse:false
deploy: off