-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
43 lines (37 loc) · 2 KB
/
Directory.Build.props
File metadata and controls
43 lines (37 loc) · 2 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
38
39
40
41
42
43
<Project>
<PropertyGroup>
<!-- Common properties for all projects -->
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<Version>0.5.0</Version>
<Authors>Dirtybit</Authors>
<!-- Package metadata for NuGet -->
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/DirtybitGames/unityctl</PackageProjectUrl>
<RepositoryUrl>https://github.com/DirtybitGames/unityctl</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>unity;unity-editor;cli;automation;remote-control;gamedev</PackageTags>
</PropertyGroup>
<ItemGroup>
<!-- Include README.md in all packages -->
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="\" />
</ItemGroup>
<PropertyGroup>
<!-- Pack all tool projects to the same artifacts directory -->
<PackageOutputPath>$(MSBuildThisFileDirectory)artifacts</PackageOutputPath>
</PropertyGroup>
<!-- Sync Unity package.json version when building Protocol (which gets copied to Unity package) -->
<Target Name="SyncUnityPackageVersion" AfterTargets="Build" Condition="'$(MSBuildProjectName)' == 'UnityCtl.Protocol'">
<PropertyGroup>
<UnityPackageJson>$(MSBuildThisFileDirectory)UnityCtl.UnityPackage/package.json</UnityPackageJson>
</PropertyGroup>
<!-- Windows: use PowerShell script -->
<Exec Condition="'$(OS)' == 'Windows_NT'"
Command="powershell -NoProfile -ExecutionPolicy Bypass -File "$(MSBuildThisFileDirectory)scripts\sync-version.ps1" -Version "$(Version)" -PackageJsonPath "$(UnityPackageJson)"" />
<!-- Linux/macOS: use bash script -->
<Exec Condition="'$(OS)' != 'Windows_NT'"
Command="bash "$(MSBuildThisFileDirectory)scripts/sync-version.sh" "$(Version)" "$(UnityPackageJson)"" />
<Message Importance="high" Text="Synced Unity package.json version to $(Version)" />
</Target>
</Project>