-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlayerLaunchScheme.csproj
60 lines (52 loc) · 2.97 KB
/
PlayerLaunchScheme.csproj
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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<DisableImplicitNuGetFallbackFolder Condition="'$(CI)' == 'true'">true</DisableImplicitNuGetFallbackFolder>
<RestoreLockedMode Condition="'$(CI)' == 'true'">true</RestoreLockedMode>
<Deterministic>true</Deterministic>
<DeterministicSourcePaths>true</DeterministicSourcePaths>
<RuntimeIdentifiers>win-x64;linux-x64;linux-arm64</RuntimeIdentifiers>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
</ItemGroup>
<Target Name="GetGitAssemblyVersion" BeforeTargets="GetAssemblyVersion">
<PropertyGroup Condition="$([System.OperatingSystem]::IsWindows())">
<DevNull>NUL</DevNull>
</PropertyGroup>
<PropertyGroup Condition="!$([System.OperatingSystem]::IsWindows())">
<DevNull>/dev/null</DevNull>
</PropertyGroup>
<Exec Command="git describe "--match=v[0-9]%2A.[0-9]%2A.[0-9]%2A" "--exclude=v%2A[!0-9]%2A.%2A[!0-9]%2A.%2A[!0-9]%2A" --tags --abbrev=7 --long --dirty 2>$(DevNull)"
ConsoleToMsBuild="true"
IgnoreExitCode="true">
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfo" />
</Exec>
<PropertyGroup Condition="'$(GitInfo)' != ''">
<Version>$([System.Text.RegularExpressions.Regex]::Match("$(GitInfo)", "\d+\.\d+\.\d+"))</Version>
<InformationalVersion>$(GitInfo)</InformationalVersion>
</PropertyGroup>
</Target>
<Target Name="PackageForRelease" AfterTargets="Publish">
<PropertyGroup>
<ZipDir>$(PublishDir)ZipDir/</ZipDir>
<ZipDestination>$(PublishDir)../$(ProjectName)_$([MSBuild]::ValueOrDefault("$(RuntimeIdentifier)","Portable"))_$(GitInfo).zip</ZipDestination>
</PropertyGroup>
<ItemGroup>
<ZipOut Include="$(PublishDir)**/*" />
<WindowsScripts Include="$(ProjectDir)Scripts/Windows/*" />
<LinuxScripts Include="$(ProjectDir)Scripts/Linux/*" />
</ItemGroup>
<Copy SourceFiles="@(ZipOut)" DestinationFolder="$(ZipDir)$(ProjectName)/%(RecursiveDir)" />
<Copy Condition="$(RuntimeIdentifier.StartsWith('linux'))" SourceFiles="@(LinuxScripts)" DestinationFolder="$(ZipDir)$(ProjectName)/" />
<Copy Condition="$(RuntimeIdentifier.StartsWith('win'))" SourceFiles="@(WindowsScripts)" DestinationFolder="$(ZipDir)$(ProjectName)/" />
<ZipDirectory SourceDirectory="$(ZipDir)" DestinationFile="$(ZipDestination)" Overwrite="true" />
<RemoveDir Directories="$(ZipDir)" />
</Target>
</Project>