Skip to content

Commit

Permalink
Updating pack cmd to be in line with the main ELMAH project's pack
Browse files Browse the repository at this point in the history
Also, updated version of NuGet.exe
  • Loading branch information
JamesDriscoll committed Mar 8, 2012
1 parent fd1b849 commit f026242
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 14 deletions.
63 changes: 49 additions & 14 deletions pack.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,64 @@
setlocal
pushd "%~dp0"

echo.
echo Building ELMAH-Sandbox
echo.
set hr=---------------------------------------------------------------------------
REM set binzip=ELMAH-1.2-sp1-bin-x86.zip
set nuget=pkg\Tools\nuget.exe

:main
call :clean ^
&& call :buildsandbox ^
&& call :autoupdate ^
&& call :packall pkg\*.nuspec
goto :EOF


:buildsandbox
call build
goto :EOF

IF ERRORLEVEL 1 GOTO :EOF

echo.
echo Making sure that NuGet.exe is up to date...
echo.
:clean
call :rd bin && call :rd base && call :rd tmp
goto :EOF

pkg\Tools\nuget.exe update
:rd
if exist %1 rd %1 /s /q
if exist %1 exit /b 1
goto :EOF

IF ERRORLEVEL 1 GOTO :EOF
:md
if not exist %1 md %1
goto :EOF

if NOT EXIST "NuGet-Packages" md "NuGet-Packages"
:download
setlocal
echo %hr%
echo Downloading %1...
call tools\wgets http://elmah.googlecode.com/files/%1 %2 %3 %4 %5 %6 %7 %8 %9
goto :EOF

for /f %%F in ('dir /a-d /b pkg\*.nuspec') DO CALL :PACKAGE pkg\%%F
:unzip
setlocal
echo %hr%
tools\7za x %*
goto :EOF

:autoupdate
echo %hr%
echo Making sure that NuGet.exe is up to date...
"%nuget%" update -self
goto :EOF

:packall
for /f %%F in ('dir /a-d /b "%1"') DO (
CALL :pack pkg\%%F
IF ERRORLEVEL 1 GOTO :EOF
)
GOTO :EOF

:PACKAGE
echo -------------------------------------------------------------------------------
:pack
echo %hr%
echo Packaging %1
pkg\Tools\nuget.exe pack "%1" -verbose -o "NuGet-Packages"
call :md bin && "%nuget%" pack "%1" -verbose -output bin
GOTO :EOF
Binary file modified pkg/Tools/NuGet.exe
Binary file not shown.

0 comments on commit f026242

Please sign in to comment.