Skip to content

Commit

Permalink
refactoring AssemblyInfo.cs into a CommonAssemblyInfo.cs.template and…
Browse files Browse the repository at this point in the history
… adjusting both the rake script and the nuserve.csproj
  • Loading branch information
davidalpert committed Sep 4, 2011
1 parent 96fb0fa commit 2fcd1f8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -38,6 +38,7 @@ _ReSharper*/
#Project files
[Bb]uild/
[Tt]emp
[Cc]ommon[Aa]ssembly[Ii]nfo.cs

#Subversion files
.svn
Expand Down
6 changes: 3 additions & 3 deletions rakefile
Expand Up @@ -31,7 +31,7 @@ nuserve_exe = "#{build_root}/nuserve.exe"
solution_file = FileList["./**/*.sln"].first
commit = Git.open(".").log.first.sha[0..10] rescue 'na'
version = "1.4.0"
assembly_info = File.join(source_root, 'nuserve', 'Properties', 'AssemblyInfo.cs')
assembly_info = File.join(source_root, 'CommonAssemblyInfo.cs')
msbuild_exe = File.join(ENV['windir'], 'Microsoft.NET','Framework', 'v4.0.30319', 'MSBuild.exe')

nuserve_zip = "nuserve-#{version}-#{commit}.zip"
Expand Down Expand Up @@ -142,7 +142,7 @@ assemblyinfo :assemblyinfo do |asm|
asm.product_name = "nuserve - #{commit}"
asm.title = "nuserve"
asm.description = "Hosts the nuget.server functionality as a self-hosted process outside of IIS."
asm.copyright = "copyright some year, by some legal entity"
asm.copyright = ""
asm.output_file = assembly_info
end

Expand All @@ -153,7 +153,7 @@ task :build => ["build:all"]

namespace :build do

msbuild :all, [:config] => [:setup] do |msb, args|
msbuild :all, [:config] => [:setup, :assemblyinfo] do |msb, args|
configuration = :Debug

if args[:config] != nil && args[:config] != 'local' then
Expand Down
Expand Up @@ -3,7 +3,7 @@
[assembly: AssemblyTitle("nuserve")]
[assembly: AssemblyDescription("Hosts the nuget.server functionality as a self-hosted process outside of IIS.")]
[assembly: AssemblyCompany("David Alpert")]
[assembly: AssemblyProduct("nuserve - e764d8af075")]
[assembly: AssemblyCopyright("copyright some year, by some legal entity")]
[assembly: AssemblyProduct("nuserve - built_by_visual_studio")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyVersion("1.4.0")]

9 changes: 8 additions & 1 deletion src/nuserve/nuserve.csproj
Expand Up @@ -111,6 +111,9 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Configuration\DefaultImplementationConvention.cs" />
<Compile Include="Configuration\FubuCore.StructureMap\AppSettingProviderRegistry.cs" />
<Compile Include="Infrastructure\Implementation\DefaultPathResolutionStrategy.cs" />
Expand All @@ -127,7 +130,6 @@
<Compile Include="Modules\PackageFilesModule.cs" />
<Compile Include="Infrastructure\Implementation\SelfHostingPackageServer.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Settings\ApiSettings.cs" />
<Compile Include="Settings\EndpointSettings.cs" />
<Compile Include="Settings\RepositorySettings.cs" />
Expand All @@ -150,6 +152,11 @@
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project=".\targets\Microsoft.Application.targets" />
<PropertyGroup>
<PreBuildEvent>echo verifying CommonAssemblyInfo.cs exists
cd
IF NOT EXIST $(ProjectDir)..\CommonAssemblyInfo.cs COPY $(ProjectDir)..\CommonAssemblyInfo.cs.template $(ProjectDir)..\CommonAssemblyInfo.cs</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

0 comments on commit 2fcd1f8

Please sign in to comment.