Commit 62ce3a62 authored by csharptest's avatar csharptest Committed by rogerk

Added version command to PublishRelease.bat, added use of external signing key

parent 7a0797f9
......@@ -2,16 +2,16 @@
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:PrepareOutputDirectory
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Debug /p:Platform="Any CPU"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Debug /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Debug_Silverlight2 /p:Platform="Any CPU"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Debug_Silverlight2 /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageName=AllBinariesAndSource.zip /p:Platform="Any CPU"
......
......@@ -2,10 +2,10 @@
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:PrepareOutputDirectory
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageName=ReleaseBinaries.zip /p:Platform="Any CPU"
......
REM @ECHO OFF
@IF "%1" == "build" GOTO BUILD
@IF "%1" == "fpush" GOTO FILEPUSH
@IF "%1" == "push" GOTO PUSH
GOTO HELP
@IF "%1" == "version" @GOTO VERSION
@IF "%1" == "build" @GOTO BUILD
@IF "%1" == "fpush" @GOTO FILEPUSH
@IF "%1" == "push" @GOTO PUSH
@GOTO HELP
:VERSION
hg log -l 1 --template "Revision: {rev}" > %~dp0\..\build_temp\revision.txt
CMD.exe /Q /C "CD %~dp0\.. && lib\StampVersion.exe /major:2 /minor:3 /build:0 /revision:build_temp\revision.txt"
@TYPE src\ProtocolBuffers\Properties\AssemblyInfo.cs | FIND "AssemblyFileVersion"
@ECHO.
@ECHO NEXT: Use the above version number to run "%0 build {Version}"
@ECHO.
@GOTO EXIT
:BUILD
@IF "%2" == "" GOTO HELP
@IF "%2" == "" @GOTO HELP
IF EXIST "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\sn.exe" SET WIN7SDK_DIR=C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\
IF NOT EXIST "%~dp0\..\release-key" hg clone https://bitbucket.org/rknapp/protobuf-csharp-port-keyfile %~dp0\..\release-key
SET PROTOBUF_KEY_FILE="/p:AssemblyOriginatorKeyFile=%~dp0\..\release-key\Google.ProtocolBuffers.snk"
MD "%~dp0\%2"
CMD.exe /Q /C "CD %~dp0 && GenerateCompletePackage.bat"
......@@ -14,12 +28,21 @@ CMD.exe /Q /C "CD %~dp0 && GenerateReleasePackage.bat"
COPY /y %~dp0\..\build_output\ReleaseBinaries.zip %~dp0\%2\protobuf-csharp-port-%2-release-binaries.zip
hg archive %~dp0\%2\protobuf-csharp-port-%2-source.zip
goto EXIT
SET PROTOBUF_KEY_FILE=
"%WIN7SDK_DIR%sn.exe" -T build_output\Package\Release\Google.ProtocolBuffers.dll
@ECHO.
@ECHO ***********************************************************
@ECHO IMPORTANT: Verify the above key output is: 55f7125234beb589
@ECHO ***********************************************************
@ECHO.
@ECHO NEXT: Verify the output in %~dp0\%2 and then run "%0 push %2 {google-code-user} {google-code-password}"
@ECHO.
@GOTO EXIT
:PUSH
@IF "%2" == "" GOTO HELP
@IF "%3" == "" GOTO HELP
@IF "%4" == "" GOTO HELP
@IF "%2" == "" @GOTO HELP
@IF "%3" == "" @GOTO HELP
@IF "%4" == "" @GOTO HELP
hg commit -m "version %2"
hg tag %2
......@@ -33,14 +56,15 @@ SET GOOGLEUPLOAD=python.exe %~dp0\googlecode_upload.py --project protobuf-csharp
%GOOGLEUPLOAD% --labels Type-Executable,Featured --summary "Version %2 binaries (release only)" %~dp0\%2\protobuf-csharp-port-%2-release-binaries.zip
@SET GOOGLEUPLOAD=
@goto EXIT
@GOTO EXIT
:HELP
@ECHO.
@ECHO Available commands for release
@ECHO %0 build 2.3.0.277
@ECHO %0 push 2.3.0.277 {google-code-user} {google-code-password}
@ECHO Available commands, run in the following order:
@ECHO 1. %0 version
@ECHO 2. %0 build {version from step 1}
@ECHO 3. %0 push {version from step 1} {google-code-user} {google-code-password}
@ECHO.
@goto EXIT
@GOTO EXIT
:EXIT
\ No newline at end of file
This diff is collapsed.
......@@ -18,6 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unittest", "unittest", "{C8
..\protos\google\protobuf\unittest_enormous_descriptor.proto = ..\protos\google\protobuf\unittest_enormous_descriptor.proto
..\protos\extest\unittest_extras_full.proto = ..\protos\extest\unittest_extras_full.proto
..\protos\extest\unittest_extras_lite.proto = ..\protos\extest\unittest_extras_lite.proto
..\protos\extest\unittest_generic_services.proto = ..\protos\extest\unittest_generic_services.proto
..\protos\google\protobuf\unittest_import.proto = ..\protos\google\protobuf\unittest_import.proto
..\protos\google\protobuf\unittest_import_lite.proto = ..\protos\google\protobuf\unittest_import_lite.proto
..\protos\google\protobuf\unittest_lite.proto = ..\protos\google\protobuf\unittest_lite.proto
......@@ -25,7 +26,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unittest", "unittest", "{C8
..\protos\google\protobuf\unittest_mset.proto = ..\protos\google\protobuf\unittest_mset.proto
..\protos\google\protobuf\unittest_no_generic_services.proto = ..\protos\google\protobuf\unittest_no_generic_services.proto
..\protos\google\protobuf\unittest_optimize_for.proto = ..\protos\google\protobuf\unittest_optimize_for.proto
..\protos\extest\unittest_generic_services.proto = ..\protos\extest\unittest_generic_services.proto
..\protos\extest\unittest_rpc_interop.proto = ..\protos\extest\unittest_rpc_interop.proto
EndProjectSection
EndProject
......@@ -61,6 +61,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{66ED1950
..\build\Common.targets = ..\build\Common.targets
..\build\GenerateCompletePackage.bat = ..\build\GenerateCompletePackage.bat
..\build\GenerateReleasePackage.bat = ..\build\GenerateReleasePackage.bat
..\build\PublishRelease.bat = ..\build\PublishRelease.bat
..\build\RunBenchmarks.bat = ..\build\RunBenchmarks.bat
EndProjectSection
EndProject
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment