Skip to content

Commit edd39ec

Browse files
committed
Merge branch 'improved-props'
2 parents e6bfb2a + c16259d commit edd39ec

File tree

13 files changed

+216
-78
lines changed

13 files changed

+216
-78
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,24 @@ _Unity® and the Unity logo are trademarks of Unity Technologies._
3434
## Basic Usage
3535

3636
```xml
37+
<!-- Directory.Build.props -->
38+
<Project>
39+
<PropertyGroup>
40+
<UnityVersion>2022.1.1f1</UnityVersion>
41+
</PropertyGroup>
42+
</Project>
43+
```
44+
45+
```xml
46+
<!-- Your .csproj file -->
3747
<Project Sdk="Microsoft.NET.Sdk">
3848
<PropertyGroup>
3949
<TargetFramework>netstandard2.1</TargetFramework>
40-
<UnityVersion>2021.2.2f1</UnityVersion>
4150
</PropertyGroup>
4251
<ItemGroup>
43-
<PackageReference Include="Unity3D" Version="1.7.0" />
52+
<PackageReference Include="Unity3D" Version="2.0.0-rc1" />
4453
</ItemGroup>
54+
<!-- Other properties/items -->
4555
</Project>
4656
```
4757

nupkg/Unity3D.nuspec

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,27 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
33
<metadata minClientVersion="2.5">
44
<id>Unity3D</id>
5-
<version>1.7.0</version>
5+
<version>2.0.0-rc1</version>
6+
<title>Unity</title>
67
<authors>Unity Technologies</authors>
7-
<owners>DerploidEntertainment</owners>
88
<icon>icon.png</icon>
99
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1010
<license type="expression">MIT</license>
1111
<projectUrl>https://github.com/DerploidEntertainment/UnityAssemblies</projectUrl>
1212
<description>Simple, forward-compatible references to ANY Unity assembly on ANY platform.</description>
13-
<releaseNotes>Added root paths for Linux</releaseNotes>
14-
<copyright>Copyright ©2019-2021 Derploid Entertainment, LLC</copyright>
13+
<readme>README.md</readme>
14+
<releaseNotes>
15+
- Unity version can now be parsed automatically from the ProjectVersion.txt file in a Unity project, if not set explicitly.
16+
- Added many new short-hand properties, with better naming (relative paths end in "Dir" or "Assembly", absolute paths end in "Path")
17+
- Reference Include paths no longer need to start with $(UnityInstallRoot)/$(UnityVersion). Most paths will now use a single short-hand property
18+
- If neither UnityVersion nor UnityProjectPath are explicitly set, then UnityVersion is set to a constant string to explain the issue
19+
</releaseNotes>
20+
<copyright>Copyright ©2019-2022 Derploid Entertainment, LLC</copyright>
1521
<tags>Unity Unity3D UnityEngine UnityEditor</tags>
1622
<repository type="git" url="https://github.com/DerploidEntertainment/UnityAssemblies.git" />
1723
</metadata>
24+
<files>
25+
<file src="..\README.md" target="" />
26+
<file src=".\**\*.*" target="" />
27+
</files>
1828
</package>

nupkg/build/Unity3D.props

Lines changed: 66 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,106 @@
11
<Project>
22

3-
<!-- Set default Unity folder paths -->
3+
<!-- Set OS-specific absolte/relative folder paths -->
44
<Choose>
55
<When Condition="$([MSBuild]::IsOsPlatform(Windows))">
66
<PropertyGroup>
77
<OSInstallRoot Condition="'$(OSInstallRoot)'==''">C:\Program Files</OSInstallRoot>
8-
<UnityManagedPath Condition="'$(UnityManagedPath)'==''">Editor\Data\Managed</UnityManagedPath>
9-
<UnityExtensionsPath Condition="'$(UnityExtensionsPath)'==''">Editor\Data\UnityExtensions\Unity</UnityExtensionsPath>
8+
<UnityManagedDir Condition="'$(UnityManagedDir)'==''">Editor\Data\Managed</UnityManagedDir>
9+
<UnityExtensionsDir Condition="'$(UnityExtensionsDir)'==''">Editor\Data\UnityExtensions\Unity</UnityExtensionsDir>
1010
</PropertyGroup>
1111
</When>
1212
<When Condition="$([MSBuild]::IsOsPlatform(OSX))">
1313
<PropertyGroup>
1414
<OSInstallRoot Condition="'$(OSInstallRoot)'==''">/Applications</OSInstallRoot>
15-
<UnityManagedPath Condition="'$(UnityManagedPath)'==''">Unity.app\Contents\Managed</UnityManagedPath>
16-
<UnityExtensionsPath Condition="'$(UnityExtensionsPath)'==''">Unity.app\Contents\UnityExtensions\Unity</UnityExtensionsPath>
15+
<UnityManagedDir Condition="'$(UnityManagedDir)'==''">Unity.app\Contents\Managed</UnityManagedDir>
16+
<UnityExtensionsDir Condition="'$(UnityExtensionsDir)'==''">Editor\Unity.app\Contents\UnityExtensions\Unity</UnityExtensionsDir>
1717
</PropertyGroup>
1818
</When>
1919
<When Condition="$([MSBuild]::IsOsPlatform(Linux))">
2020
<PropertyGroup>
2121
<OSInstallRoot Condition="'$(OSInstallRoot)'==''">$([System.Environment]::GetFolderPath('System.Environment+SpecialFolder.UserProfile'))</OSInstallRoot>
22-
<UnityManagedPath Condition="'$(UnityManagedPath)'==''">Editor\Data\Managed</UnityManagedPath>
23-
<UnityExtensionsPath Condition="'$(UnityExtensionsPath)'==''">Editor\Data\UnityExtensions\Unity</UnityExtensionsPath>
22+
<UnityManagedDir Condition="'$(UnityManagedDir)'==''">Editor\Data\Managed</UnityManagedDir>
23+
<UnityExtensionsDir Condition="'$(UnityExtensionsDir)'==''">Editor\Data\UnityExtensions\Unity</UnityExtensionsDir>
2424
</PropertyGroup>
2525
</When>
2626
</Choose>
27+
28+
<!--
29+
Parse editor version from ProjectVersion.txt file in Unity project. Its contents look like this (minus indent):
30+
m_EditorVersion: 2021.3.2f1
31+
m_EditorVersionWithRevision: 2021.3.2f1 (d6360bedb9a0)
32+
33+
We first condense this to single "CSV" line, e.g.: m_EditorVersion,2021.3.2f1,m_EditorVersionWithRevision,2021.3.2f1 (d6360bedb9a0)
34+
Then pluck out the versions by splitting on comma
35+
-->
36+
<PropertyGroup Condition="'$(UnityVersion)'=='' And '$(UnityProjectPath)'!=''">
37+
<UnityProjectVersionTxt>$([System.IO.File]::ReadAllText(`$(UnityProjectPath)\ProjectSettings\ProjectVersion.txt`))</UnityProjectVersionTxt>
38+
<UnityProjectVersionCsv>$([System.Text.RegularExpressions.Regex]::Replace(`$(UnityProjectVersionTxt)`, `\r\n|\r|\n|: `, `,`))</UnityProjectVersionCsv>
39+
<UnityVersion>$(UnityProjectVersionCsv.Split(`,`)[1].Trim())</UnityVersion>
40+
</PropertyGroup>
41+
<PropertyGroup Condition="'$(UnityVersion)'=='' And '$(UnityProjectPath)'==''">
42+
<UnityVersion>SET_VERSION_OR_PROJECT</UnityVersion>
43+
</PropertyGroup>
44+
45+
<!-- Set default Unity absolte/relative folder paths -->
2746
<PropertyGroup>
28-
<UnityInstallRoot Condition="'$(UnityInstallRoot)'==''">$(OSInstallRoot)\Unity\Hub\Editor</UnityInstallRoot>
29-
<UnityModulesPath Condition="'$(UnityModulesPath)'==''">$(UnityManagedPath)\UnityEngine</UnityModulesPath>
30-
<UnityPlaybackEnginesPath Condition="'$(UnityPlaybackEnginesPath)'==''">Editor\Data\PlaybackEngines</UnityPlaybackEnginesPath>
31-
<UnityAndroidPlayerPath Condition="'$(UnityAndroidPlayerPath)'==''">$(UnityPlaybackEnginesPath)\AndroidPlayer</UnityAndroidPlayerPath>
32-
<UnityiOSSupportPath Condition="'$(UnityiOSSupportPath)'==''">$(UnityPlaybackEnginesPath)\iOSSupport</UnityiOSSupportPath>
33-
<UnityBuiltInPackagesPath Condition="'$(UnityBuiltInPackagesPath)'==''">Editor\Data\Resources\PackageManager\BuiltInPackages</UnityBuiltInPackagesPath>
34-
35-
<UnityPackageCachePath Condition="'$(UnityPackageCachePath)'==''">Library\PackageCache</UnityPackageCachePath>
36-
<UnityScriptAssembliesPath Condition="'$(UnityScriptAssembliesPath)'==''">Library\ScriptAssemblies</UnityScriptAssembliesPath>
47+
<UnityInstallRootDir Condition="'$(UnityInstallRootDir)'==''">Unity\Hub\Editor</UnityInstallRootDir>
48+
<UnityInstallRoot Condition="'$(UnityInstallRoot)'==''">$(OSInstallRoot)\$(UnityInstallRootDir)</UnityInstallRoot>
49+
50+
<UnityVersionInstallPath Condition="'$(UnityVersionInstallPath)'==''">$(UnityInstallRoot)\$(UnityVersion)</UnityVersionInstallPath>
51+
<UnityManagedPath Condition="'$(UnityManagedPath)'==''">$(UnityVersionInstallPath)\$(UnityManagedDir)</UnityManagedPath>
52+
<UnityExtensionsPath Condition="'$(UnityExtensionsPath)'==''">$(UnityVersionInstallPath)\$(UnityExtensionsDir)</UnityExtensionsPath>
53+
54+
<UnityModulesDir Condition="'$(UnityModulesDir)'==''">UnityEngine</UnityModulesDir>
55+
<UnityModulesPath Condition="'$(UnityModulesPath)'==''">$(UnityManagedPath)\$(UnityModulesDir)</UnityModulesPath>
56+
57+
<UnityPlaybackEnginesDir Condition="'$(UnityPlaybackEnginesDir)'==''">Editor\Data\PlaybackEngines</UnityPlaybackEnginesDir>
58+
<UnityAndroidPlayerDir Condition="'$(UnityAndroidPlayerDir)'==''">$(UnityPlaybackEnginesDir)\AndroidPlayer</UnityAndroidPlayerDir>
59+
<UnityiOSSupportDir Condition="'$(UnityiOSSupportDir)'==''">$(UnityPlaybackEnginesDir)\iOSSupport</UnityiOSSupportDir>
60+
<UnityPlaybackEnginesPath Condition="'$(UnityPlaybackEnginesPath)'==''">$(UnityVersionInstallPath)\$(UnityPlaybackEnginesDir)</UnityPlaybackEnginesPath>
61+
<UnityAndroidPlayerPath Condition="'$(UnityAndroidPlayerPath)'==''">$(UnityVersionInstallPath)\$(UnityAndroidPlayerDir)</UnityAndroidPlayerPath>
62+
<UnityiOSSupportPath Condition="'$(UnityiOSSupportPath)'==''">$(UnityVersionInstallPath)\$(UnityiOSSupportDir)</UnityiOSSupportPath>
63+
64+
<UnityBuiltInPackagesDir Condition="'$(UnityBuiltInPackagesDir)'==''">Editor\Data\Resources\PackageManager\BuiltInPackages</UnityBuiltInPackagesDir>
65+
<UnityBuiltInPackagesPath Condition="'$(UnityBuiltInPackagesPath)'==''">$(UnityVersionInstallPath)\$(UnityBuiltInPackagesDir)</UnityBuiltInPackagesPath>
66+
67+
<UnityPackageCacheDir Condition="'$(UnityPackageCacheDir)'==''">Library\PackageCache</UnityPackageCacheDir>
68+
<UnityPackageCachePath Condition="'$(UnityPackageCachePath)'==''">$(UnityProjectPath)\$(UnityPackageCacheDir)</UnityPackageCachePath>
69+
70+
<UnityScriptAssembliesDir Condition="'$(UnityScriptAssembliesDir)'==''">Library\ScriptAssemblies</UnityScriptAssembliesDir>
71+
<UnityScriptAssembliesPath Condition="'$(UnityScriptAssembliesPath)'==''">$(UnityProjectPath)\$(UnityScriptAssembliesDir)</UnityScriptAssembliesPath>
3772
</PropertyGroup>
3873

39-
<!-- Set relative paths of specific Unity assemblies -->
74+
<!-- Set default paths of specific Unity assemblies -->
4075
<PropertyGroup>
4176
<UnityEnginePath Condition="'$(UnityEnginePath)'==''">$(UnityManagedPath)\UnityEngine.dll</UnityEnginePath>
4277
<UnityEditorPath Condition="'$(UnityEditorPath)'==''">$(UnityManagedPath)\UnityEditor.dll</UnityEditorPath>
4378
<UnityEngineUIPath Condition="'$(UnityEngineUIPath)'==''">$(UnityExtensionsPath)\GUISystem\UnityEngine.UI.dll</UnityEngineUIPath>
4479
<UnityEngineTestRunnerPath Condition="'$(UnityEngineTestRunnerPath)'==''">$(UnityExtensionsPath)\TestRunner\UnityEngine.TestRunner.dll</UnityEngineTestRunnerPath>
4580
</PropertyGroup>
4681

47-
<!-- Set relative paths of specific PackageCache assemblies -->
82+
<!-- Set default paths of specific PackageCache assemblies -->
4883
<PropertyGroup>
49-
<NewtonsoftJsonPath Condition="'$(NewtonsoftJsonPath)'==''">$(UnityPackageCachePath)\com.unity.nuget.newtonsoft-json*\Runtime\Newtonsoft.Json.dll</NewtonsoftJsonPath>
50-
<NunitPath Condition="'$(NunitPath)'==''">$(UnityPackageCachePath)\com.unity.ext.nunit*\net35\unity-custom\nunit.framework.dll</NunitPath>
51-
<MoqPath Condition="'$(MoqPath)'==''">$(UnityPackageCachePath)\nuget.moq*\Moq.dll</MoqPath>
52-
<UnityAnalyticsStandardEventsPath Condition="'$(UnityAnalyticsStandardEventsPath)'==''">$(UnityPackageCachePath)\com.unity.analytics*\AnalyticsStandardEvents\Unity.Analytics.StandardEvents.dll</UnityAnalyticsStandardEventsPath>
84+
<NewtonsoftJsonAssembly Condition="'$(NewtonsoftJsonAssembly)'==''">com.unity.nuget.newtonsoft-json*\Runtime\Newtonsoft.Json.dll</NewtonsoftJsonAssembly>
85+
<NewtonsoftJsonPath Condition="'$(NewtonsoftJsonPath)'==''">$(UnityPackageCachePath)\$(NewtonsoftJsonAssembly)</NewtonsoftJsonPath>
86+
87+
<NunitAssembly Condition="'$(NunitAssembly)'==''">com.unity.ext.nunit*\net35\unity-custom\nunit.framework.dll</NunitAssembly>
88+
<NunitPath Condition="'$(NunitPath)'==''">$(UnityPackageCachePath)\$(NunitAssembly)</NunitPath>
89+
90+
<MoqAssembly Condition="'$(MoqAssembly)'==''">nuget.moq*\Moq.dll</MoqAssembly>
91+
<MoqPath Condition="'$(MoqPath)'==''">$(UnityPackageCachePath)\$(MoqAssembly)</MoqPath>
92+
93+
<UnityAnalyticsStandardEventsAssembly Condition="'$(UnityAnalyticsStandardEventsAssembly)'==''">com.unity.analytics*\AnalyticsStandardEvents\Unity.Analytics.StandardEvents.dll</UnityAnalyticsStandardEventsAssembly>
94+
<UnityAnalyticsStandardEventsPath Condition="'$(UnityAnalyticsStandardEventsPath)'==''">$(UnityPackageCachePath)\$(UnityAnalyticsStandardEventsAssembly)</UnityAnalyticsStandardEventsPath>
95+
5396
<UnityEditorAndroidExtensionsPath Condition="'$(UnityEditorAndroidExtensionsPath)'==''">$(UnityAndroidPlayerPath)\UnityEditor.Android.Extensions.dll</UnityEditorAndroidExtensionsPath>
5497
<UnityEditoriOSExtensionsCommonPath Condition="'$(UnityEditoriOSExtensionsCommonPath)'==''">$(UnityiOSSupportPath)\UnityEditor.iOS.Extensions.Common.dll</UnityEditoriOSExtensionsCommonPath>
5598
<UnityEditoriOSExtensionsXcodePath Condition="'$(UnityEditoriOSExtensionsXcodePath)'==''">$(UnityiOSSupportPath)\UnityEditor.iOS.Extensions.Xcode.dll</UnityEditoriOSExtensionsXcodePath>
5699
</PropertyGroup>
57100

58101
<!-- Add default Unity references -->
59102
<ItemGroup>
60-
<Reference Include="$(UnityInstallRoot)\$(UnityVersion)\$(UnityEnginePath)" Private="false" />
103+
<Reference Include="$(UnityEnginePath)" Private="false" />
61104
</ItemGroup>
62105

63106
</Project>

nupkg/readme.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,23 @@
2020

2121
Thank you for installing the Unity3D NuGet package!
2222

23-
Example .csproj file (using Unity 2021.2.2f1, targeting .NET Standard 2.1 profile):
23+
To use this package, define a Directory.Build.props file in the same folder as your .csproj file (or any of its parent folders),
24+
replacing the Unity version with your version:
25+
26+
<Project>
27+
<UnityVersion>2022.1.1f1</UnityVersion>
28+
</Project
29+
30+
Then, make sure your .csproj file looks something like this:
2431

2532
<Project Sdk="Microsoft.NET.Sdk">
2633
<PropertyGroup>
2734
<TargetFramework>netstandard2.1</TargetFramework>
28-
<UnityVersion>2021.2.2f1</UnityVersion>
2935
</PropertyGroup>
3036
<ItemGroup>
31-
<PackageReference Include="Unity3D" Version="1.7.0" />
37+
<PackageReference Include="Unity3D" Version="2.0.0-rc1" />
3238
</ItemGroup>
39+
<!-- Other properties/items -->
3340
</Project>
3441

3542
For complete documentation, see our README on GitHub: https://github.com/DerploidEntertainment/UnityAssemblies/blob/master/README.md

publish.sh

Lines changed: 54 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
#!/bin/bash
22

3+
verifyReleaseNotes() {
4+
echo ""
5+
echo "Verify that the <releaseNotes/> element of nuspec is up-to-date"
6+
echo ""
7+
read -p "Press [Enter] when you're done..."
8+
}
9+
310
bumpVersions() {
11+
echo ""
12+
413
# Get new version strings from user
514
newPkgVersion=
6-
prompt="Enter the new version (such as '1.0.0-rc1'): "
15+
prompt="Enter the new package version (such as '1.0.0-rc1'): "
716
read -p "$prompt" newPkgVersion
817
while [ -z "$newPkgVersion" ] ; do
918
echo "Package version string cannot be empty."
@@ -17,63 +26,80 @@ bumpVersions() {
1726
echo "Unity version string cannot be empty."
1827
read -p "$prompt" newUnityVersion
1928
done
20-
29+
2130
# Update package version strings to the provided one
2231
echo ""
2332
echo "Changing package version strings to '$newPkgVersion' in:"
2433

25-
findTxt="PackageReference Include=\"Unity3D\""
26-
replaceTxt="$findTxt Version=\"$newPkgVersion\" />"
34+
findRegex="PackageReference Include=\"Unity3D\""
35+
replaceTxt="$findRegex Version=\"$newPkgVersion\" />"
2736

2837
pkgReadmePath=$cwd/nupkg/readme.txt
2938
echo " Sample project file in '$pkgReadmePath'..."
30-
sed --expression="s|$findTxt.*|$replaceTxt|" --in-place "$pkgReadmePath"
39+
sed --expression="s|$findRegex.*|$replaceTxt|" --in-place "$pkgReadmePath"
3140
errNum=$?
3241
if [ $errNum != 0 ]; then return $errNum; fi
3342

3443
mainReadmePath=$cwd/README.md
3544
echo " Sample project file at top of '$mainReadmePath'..."
36-
sed --expression="s|$findTxt.*|$replaceTxt|" --in-place "$mainReadmePath"
45+
sed --expression="s|$findRegex.*|$replaceTxt|" --in-place "$mainReadmePath"
3746
errNum=$?
3847
if [ $errNum != 0 ]; then return $errNum; fi
3948

40-
findTxt="<version>"
41-
replaceTxt="$findTxt$newPkgVersion</version>"
49+
findRegex="<version>"
50+
replaceTxt="$findRegex$newPkgVersion</version>"
4251

4352
nuspecPath=$cwd/nupkg/Unity3D.nuspec
4453
echo " Nuspec at '$nuspecPath'..."
45-
sed --expression="s|$findTxt.*|$replaceTxt|" --in-place "$nuspecPath"
54+
sed --expression="s|$findRegex.*|$replaceTxt|" --in-place "$nuspecPath"
4655
errNum=$?
4756
if [ $errNum != 0 ]; then return $errNum; fi
4857

49-
# Update Unity version strings to the provided one
58+
# Update Unity version strings to the provided one
5059
echo "Changing Unity version strings to '$newUnityVersion' in:"
5160

52-
findTxt="<UnityVersion>"
53-
replaceTxt="$findTxt$newUnityVersion</UnityVersion>"
61+
findRegex="using Unity .*,"
62+
replaceTxt="using Unity $newUnityVersion,"
63+
64+
echo " Sample project file description in '$pkgReadmePath'..."
65+
sed --expression="s|$findRegex|$replaceTxt|" --in-place "$pkgReadmePath"
66+
errNum=$?
67+
if [ $errNum != 0 ]; then return $errNum; fi
68+
69+
findRegex="<UnityVersion>"
70+
replaceTxt="$findRegex$newUnityVersion</UnityVersion>"
5471

5572
echo " Sample project file in '$pkgReadmePath'..."
56-
sed --expression="s|$findTxt.*|$replaceTxt|" --in-place "$pkgReadmePath"
73+
sed --expression="s|$findRegex.*|$replaceTxt|" --in-place "$pkgReadmePath"
5774
errNum=$?
5875
if [ $errNum != 0 ]; then return $errNum; fi
5976

6077
mainReadmePath=$cwd/README.md
6178
echo " Sample project files in '$mainReadmePath'..."
62-
sed --expression="s|$findTxt.*|$replaceTxt|" --in-place "$mainReadmePath"
79+
sed --expression="s|$findRegex.*|$replaceTxt|" --in-place "$mainReadmePath"
6380
errNum=$?
6481
if [ $errNum != 0 ]; then return $errNum; fi
65-
66-
echo ""
67-
echo "Commit the version string changes that we just made"
68-
echo ""
69-
read -p "Press [Enter] when you're done..."
7082
}
7183

72-
verifyReleaseNotes() {
84+
bumpCurrentYear() {
85+
defaultCopyrightStartYear=2019
7386
echo ""
74-
echo "Verify that the <releaseNotes/> element of nuspec is up-to-date"
87+
read -p "Enter the 'start year' of the copyright for this package (or hit [ENTER] to use '$defaultCopyrightStartYear'): " copyrightStartYear
88+
if [ -z "$copyrightStartYear" ]; then copyrightStartYear=$defaultCopyrightStartYear; fi
89+
90+
currentYear=$(date +'%Y')
91+
7592
echo ""
76-
read -p "Press [Enter] when you're done..."
93+
echo "Updating current year to '$currentYear' in:"
94+
95+
findRegex="[0-9]{4}-[0-9]{4}"
96+
replaceTxt="$copyrightStartYear-$currentYear"
97+
98+
nuspecPath=$cwd/nupkg/Unity3D.nuspec
99+
echo " Nuspec at '$nuspecPath'..."
100+
sed --regexp-extended --expression="s|$findRegex|$replaceTxt|" --in-place "$nuspecPath"
101+
errNum=$?
102+
if [ $errNum != 0 ]; then return $errNum; fi
77103
}
78104

79105
checkForNuGet() {
@@ -160,7 +186,12 @@ main() {
160186
cwd="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
161187

162188
# Make sure user has updated package info
163-
bumpVersions && verifyReleaseNotes
189+
verifyReleaseNotes && bumpVersions && bumpCurrentYear
190+
191+
echo ""
192+
echo "Commit the changes to version/year that this script just made"
193+
echo ""
194+
read -p "Press [Enter] when you're done..."
164195

165196
# Get the path to nuget.exe
166197
checkForNuGet

test/Directory.Build.props

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<Project>
22

3-
<Import Project= "..\nupkg\build\Unity3D.props"/>
4-
53
<PropertyGroup>
64
<Configurations>
75
Standard21_2021_3;Net472_2021_3;Net48_2021_3;

test/TestAllRefs/Test.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@
7272
#define UNITYENGINE_DEVICE_AVAILABLE
7373
#endif
7474

75-
namespace Unity3D.Test {
76-
public class TestBehaviour : UnityEngine.MonoBehaviour {
75+
namespace Unity3D.Test
76+
{
77+
public class TestBehaviour : UnityEngine.MonoBehaviour
78+
{
7779
public UnityEngine.UI.Text TextField;
7880
public UnityEngine.TestTools.TestPlatform TestPlatformField;
7981
public UnityEditor.Android.AndroidPlatformIconKind AndroidPlatformIconKind;
@@ -96,7 +98,8 @@ public class TestEditor : UnityEditor.Editor { }
9698
#if NUNIT_AVAILABLE
9799
[NUnit.Framework.TestFixture]
98100
#endif
99-
public class TestFixture {
101+
public class TestFixture
102+
{
100103
#if MOQ_AVAILABLE
101104
public Moq.Mock<TestBehaviour> Mock;
102105
#endif

0 commit comments

Comments
 (0)