11@ echo off
22
3- :: Check WMIC is available
4- WMIC.EXE Alias /? > NUL 2 >& 1 || GOTO s_error
3+ set GETTIMEKEY = powershell get-date -format " {yyyyMMdd-HHmm} "
4+ for /f %%i in (' %GETTIMEKEY% ') do set TIMEKEY = %%i
55
6- :: Use WMIC to retrieve date and time
7- FOR /F " skip=1 tokens=1-6" %%G IN ('WMIC Path Win32_LocalTime Get Day^ ,Hour^ ,Minute^ ,Month^ ,Second^ ,Year /Format:table') DO (
8- IF " %%~L " == " " goto s_done
9- Set _YYYY = %%L
10- Set _MM = 00%%J
11- Set _DD = 00%%G
12- Set _HOUR = 00%%H
13- SET _MINUTE = 00%%I
14- )
15- :s_done
6+ set VERSIONSUFFIX = Preview-%TIMEKEY%
167
17- :: Pad digits with leading zeros
18- Set _MM = %_MM:~-2 %
19- Set _DD = %_DD:~-2 %
20- Set _HOUR = %_HOUR:~-2 %
21- Set _MINUTE = %_MINUTE:~-2 %
8+ echo Building 1.0.0-%VERSIONSUFFIX%
229
23- :: Display the date/time in ISO 8601 format:
24- Set _ISODATE = %_YYYY% -%_MM% -%_DD% %_HOUR% :%_MINUTE%
25- Echo %_ISODATE%
10+ dotnet build -c:Release --version-suffix %VERSIONSUFFIX% /p:Authors=vpenades SharpGLTF.Core\SharpGLTF.Core.csproj
11+ dotnet build -c:Release --version-suffix %VERSIONSUFFIX% /p:Authors=vpenades SharpGLTF.Toolkit\SharpGLTF.Toolkit.csproj
2612
27- set VERSIONSUFFIX = Preview-%_YYYY%%_MM%%_DD% -%_HOUR%%_MINUTE%
13+ dotnet nuget push " SharpGLTF.Core/bin/Release/SharpGLTF.Core.1.0.0-%VERSIONSUFFIX% .nupkg" -s " github" --force-english-output
14+ dotnet nuget push " SharpGLTF.Toolkit/bin/Release/SharpGLTF.Toolkit.1.0.0-%VERSIONSUFFIX% .nupkg" -s " github" --force-english-output
2815
29- echo Building %VERSIONSUFFIX%
30-
31- dotnet build -c:Release --version-suffix %VERSIONSUFFIX% SharpGLTF.Core\SharpGLTF.Core.csproj
32- dotnet build -c:Release --version-suffix %VERSIONSUFFIX% SharpGLTF.Toolkit\SharpGLTF.Toolkit.csproj
33-
34- rem dotnet nuget push "SharpGLTF.Core/bin/Release/SharpGLTF.Core.1.0.0-%VERSIONSUFFIX%.nupkg" --source "github"
35- rem dotnet nuget push "SharpGLTF.Toolkit/bin/Release/SharpGLTF.Toolkit.1.0.0-%VERSIONSUFFIX%.nupkg" --source "github"
36-
37- nuget push " SharpGLTF.Core/bin/Release/SharpGLTF.Core.1.0.0-%VERSIONSUFFIX% .nupkg" -src " github"
38- nuget push " SharpGLTF.Toolkit/bin/Release/SharpGLTF.Toolkit.1.0.0-%VERSIONSUFFIX% .nupkg" -src " github"
16+ rem nuget push "SharpGLTF.Core/bin/Release/SharpGLTF.Core.1.0.0-%VERSIONSUFFIX%.nupkg" -src "github"
17+ rem nuget push "SharpGLTF.Toolkit/bin/Release/SharpGLTF.Toolkit.1.0.0-%VERSIONSUFFIX%.nupkg" -src "github"
3918
4019pause
0 commit comments