Skip to content

Commit

Permalink
Ensure Unity publishing works without disrupting other targets (#152)
Browse files Browse the repository at this point in the history
* Ensure Unity publishing works without disrupting other targets

* Remove target framework property from Arch project
  • Loading branch information
reeseschultz authored Oct 3, 2023
1 parent f480a31 commit a412ba9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
DependsOnTargets="Publish"
Condition="'$(UnityPublish.Contains(true))'">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFrameworks>netstandard2.1</TargetFrameworks>
<Configuration>Release</Configuration>
<UseAppHost>false</UseAppHost>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
Expand Down
9 changes: 7 additions & 2 deletions scripts/UnityPublish.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#!/bin/bash

# Publishes Unity release to dist/Assemblies using only netstandard2.0 and netstandard2.1
# Does NOT include source generation
#########################################################################################

dotnet restore

assemblyDir="`pwd`/dist/Assemblies"

rm -rf "${assemblyDir}"

mkdir -p "${assemblyDir}"

dotnet msbuild /t:Unity -p:PublishDir="${assemblyDir}"
dotnet msbuild /t:Unity \
-p:PublishDir="${assemblyDir}" \
-p:TargetFramework=netstandard2.1 \
-p:TargetFrameworks=netstandard2.1 \
-p:TargetFrameworkVersion=v2.1

0 comments on commit a412ba9

Please sign in to comment.