Skip to content

Commit

Permalink
patch assemblyinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
mookid8000 committed Sep 8, 2016
1 parent daded1e commit 01e38f9
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -27,4 +27,5 @@ _NCrunch_*

# MS Guideline
**/packages/*
!**/packages/build/
!**/packages/build/
AssemblyInfo_Patch.cs
7 changes: 4 additions & 3 deletions Rebus/Properties/AssemblyInfo.cs
Expand Up @@ -34,6 +34,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: InternalsVisibleTo("Rebus.Tests")]
[assembly: InternalsVisibleTo("Rebus.Tests")]

[assembly: AssemblyVersion("$version$")]
[assembly: AssemblyFileVersion("$version$")]
6 changes: 5 additions & 1 deletion Rebus/Rebus.csproj
Expand Up @@ -49,6 +49,7 @@
<ItemGroup>
<Compile Include="Activation\BuiltinHandlerActivator.cs" />
<Compile Include="Activation\IContainerAdapter.cs" />
<Compile Include="Properties\AssemblyInfo_Patch.cs" />
<Compile Include="Auditing\Messages\AuditHeaders.cs" />
<Compile Include="Auditing\Messages\AuditingHelper.cs" />
<Compile Include="Auditing\Messages\MessageAuditingConfigurationExtensions.cs" />
Expand Down Expand Up @@ -309,7 +310,7 @@
<Compile Include="Transport\Msmq\MsmqTransport.cs" />
<Compile Include="Messages\TransportMessage.cs" />
<Compile Include="Transport\Msmq\MsmqUtil.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<None Include="Properties\AssemblyInfo.cs" />
<Compile Include="Extensions\DictionaryExtensions.cs" />
<Compile Include="Routing\IRouter.cs" />
<Compile Include="Serialization\ISerializer.cs" />
Expand All @@ -332,6 +333,9 @@
<None Include="Rebus.nuspec" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>$(ProjectDir)\..\scripts\patch_assemblyinfo.cmd $(ProjectDir)</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
3 changes: 3 additions & 0 deletions scripts/build-package.cmd
Expand Up @@ -68,6 +68,9 @@ if not exist "%destination%" (
)
)

set assemblyinfo=%reporoot%\%name%\Properties\GeneratedAssemblyInfo.cs


"%msbuild%" "%proj%" /p:Configuration=Release /t:rebuild
if %ERRORLEVEL% neq 0 (
echo Build failed - error %ERRORLEVEL%.
Expand Down
12 changes: 12 additions & 0 deletions scripts/patch_assemblyinfo.cmd
@@ -0,0 +1,12 @@
@echo off

set reporoot=%~dp0\..
set aversion=%reporoot%\tools\aversion\aversion
set projectdir=%1

if "%version%"=="" (
"%aversion%" patch -ver 1.0.0 -in %projectdir%\Properties\AssemblyInfo.cs -out %projectdir%\Properties\AssemblyInfo_Patch.cs -token $version$
) else (
"%aversion%" patch -ver %version% -in %projectdir%\Properties\AssemblyInfo.cs -out %projectdir%\Properties\AssemblyInfo_Patch.cs -token $version$
)

Binary file added tools/aversion/Aversion.exe
Binary file not shown.

0 comments on commit 01e38f9

Please sign in to comment.