File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed
Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public class NugetPreferences : SettingsProvider
3434 /// <summary>
3535 /// The current version of NuGet for Unity.
3636 /// </summary>
37- public const string NuGetForUnityVersion = "4.0.2 " ;
37+ public const string NuGetForUnityVersion = "4.1.0 " ;
3838
3939 private const float LabelPading = 5 ;
4040
Original file line number Diff line number Diff line change 11{
22 "name" : " com.github-glitchenzo.nugetforunity" ,
33 "displayName" : " NuGetForUnity" ,
4- "version" : " 4.0.2 " ,
4+ "version" : " 4.1.0 " ,
55 "description" : " A NuGet Package Manager for Unity" ,
66 "unity" : " 2018.4" ,
77 "keywords" : [
Original file line number Diff line number Diff line change 1+ $ErrorActionPreference = ' Stop'
2+
3+ $packageJsonFilePath = ' src/NuGetForUnity/package.json'
4+ $nugetPreferencesCsFilePath = ' src/NuGetForUnity/Editor/Ui/NugetPreferences.cs'
5+
6+ $oldLocation = Get-Location
7+ Set-Location $PSScriptRoot / ..
8+
9+ try {
10+ $newVersionNumber = Read-Host - Prompt " New version number"
11+ $packageJsonContent = Get-Content - Raw - Path $packageJsonFilePath
12+ $packageJsonContent = $packageJsonContent -replace ' ("version": ")[^"]+(")' , " `$ {1}$newVersionNumber `$ {2}"
13+ Set-Content - Value $packageJsonContent - Path $packageJsonFilePath - Encoding utf8NoBOM - NoNewline
14+
15+ $nugetPreferencesCsFileContent = Get-Content - Raw - Path $nugetPreferencesCsFilePath
16+ $nugetPreferencesCsFileContent = $nugetPreferencesCsFileContent -replace ' (public const string NuGetForUnityVersion = ")[^"]+(";)' , " `$ {1}$newVersionNumber `$ {2}"
17+ Set-Content - Value $nugetPreferencesCsFileContent - Path $nugetPreferencesCsFilePath - Encoding utf8BOM - NoNewline
18+ }
19+ finally {
20+ Set-Location $oldLocation
21+ }
You can’t perform that action at this time.
0 commit comments