forked from SubnauticaNitrox/Nitrox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNitrox.Shared.props
More file actions
37 lines (31 loc) · 2.28 KB
/
Nitrox.Shared.props
File metadata and controls
37 lines (31 loc) · 2.28 KB
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
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- General build properties -->
<PropertyGroup>
<!-- Current machine operating system -->
<_OSArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)</_OSArchitecture>
<_IsWindows>$([System.OperatingSystem]::IsWindows())</_IsWindows>
<_IsLinux>$([System.OperatingSystem]::IsLinux())</_IsLinux>
<_IsMacOS>$([System.OperatingSystem]::IsMacOS())</_IsMacOS>
<!-- Current project build configuration -->
<_IsRelease>$([System.String]::Equals($(Configuration), 'Release'))</_IsRelease>
<_IsDebug>$([System.String]::Equals($(Configuration), 'Debug'))</_IsDebug>
<!-- Current RID build configuration -->
<_IsWindowsTarget>false</_IsWindowsTarget>
<_IsWindowsTarget Condition="'$(RuntimeIdentifier)' == 'win-x64'">true</_IsWindowsTarget>
<_IsLinuxTarget>false</_IsLinuxTarget>
<_IsLinuxTarget Condition="'$(RuntimeIdentifier)' == 'linux-x64' Or '$(RuntimeIdentifier)' == 'linux-arm64'">true</_IsLinuxTarget>
<_IsMacOSTarget>false</_IsMacOSTarget>
<_IsMacOSTarget Condition="'$(RuntimeIdentifier)' == 'osx-x64' Or '$(RuntimeIdentifier)' == 'osx-arm64'">true</_IsMacOSTarget>
</PropertyGroup>
<!-- Git info properties -->
<PropertyGroup>
<_GitRootPath>$(MSBuildThisFileDirectory)\.git\</_GitRootPath>
<_GitRefFilePath>$(_GitRootPath)HEAD</_GitRefFilePath>
<_GitRefHashFilePath Condition="Exists('$(_GitRefFilePath)')">$([System.IO.File]::ReadAllText('$(_GitRefFilePath)').Trim().Substring(5))</_GitRefHashFilePath>
<_GitRefHashFilePath Condition="!$([System.Text.RegularExpressions.Regex]::IsMatch('$(_GitRefHashFilePath)', '^[0-9a-fA-F]+$'))">$(_GitRootPath)$(_GitRefHashFilePath)</_GitRefHashFilePath>
<!-- If detached head, hash is in .git/HEAD file. -->
<_GitRefHashFilePath Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(_GitRefHashFilePath)', '^[0-9a-fA-F]+$'))">$(_GitRefFilePath)</_GitRefHashFilePath>
<_GitHash Condition="Exists('$(_GitRefHashFilePath)')">$([System.IO.File]::ReadAllText('$(_GitRefHashFilePath)').Trim())</_GitHash>
</PropertyGroup>
</Project>