2015-10-08 21:41:04 +00:00
2015-10-19 06:29:51 +00:00
setlocal EnableDelayedExpansion
2015-10-27 01:31:06 +00:00
REM UTC Timestamp of the last commit is used as the build number. This is for easy synchronization of build number between Windows, OSX and Linux builds.
REM Using powershell is way easier to retrive and format the timestamp in any way we want.
set LAST_COMMIT_TIMESTAMP = powershell -Command " & { $timestamp = git log -1 --format= %% ct ; $origin = New-Object -Type DateTime -ArgumentList 1970, 1, 1, 0, 0, 0, 0; $commitTime = $origin.AddSeconds($timestamp); echo $commitTime.ToString(\ " yyyyMMdd-HHmmss\" );} "
for /f %% i in ( ' %LAST_COMMIT_TIMESTAMP% ' ) do set DOTNET_BUILD_VERSION = 0.0.1-alpha-%% i
2015-10-19 06:29:51 +00:00
where dnvm
if %ERRORLEVEL% neq 0 (
@ powershell -NoProfile -ExecutionPolicy unrestricted -Command " &{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))} "
set PATH = !PATH! ;!USERPROFILE! \.dnx\bin
set DNX_HOME = !USERPROFILE! \.dnx
goto continue
2015-10-08 21:41:04 +00:00
)
2015-10-19 06:29:51 +00:00
: continue
2015-10-21 22:21:14 +00:00
echo *** Building dotnet ***
2015-10-20 16:05:17 +00:00
call %~dp0 scripts/bootstrap.cmd
if %errorlevel% neq 0 exit /b %errorlevel%
2015-10-21 22:21:14 +00:00
echo *** Packaging dotnet ***
2015-10-20 16:05:17 +00:00
call %~dp0 scripts/package.cmd
2015-10-19 06:29:51 +00:00
if %errorlevel% neq 0 exit /b %errorlevel%