Skip to content

Commit

Permalink
Added source export, new feature hierarchy in installer.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkowalski committed May 1, 2010
1 parent b2f811c commit 3925129
Show file tree
Hide file tree
Showing 5 changed files with 199 additions and 86 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tools/SHFB export-ignore
tools/Sandcastle export-ignore
tools/Wix export-ignore



12 changes: 9 additions & 3 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,13 @@ if (%1)==(checkinsuite) (
)

if (%1)==(archive) (
set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Archive /p:ArchiveSuffix=%2
set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:Archive
shift
goto next
)

if (%1)==(sourcearchive) (
set MSBUILD_ARGUMENTS=%MSBUILD_ARGUMENTS% /t:SourceArchive
shift
goto next
)
Expand Down Expand Up @@ -196,7 +201,8 @@ echo Targets can be:
echo.
echo clean Removes output files
echo deepclean Removes temporary and intermediate files
echo archive {suffix} Produce ZIP files for each framework
echo archive Produce ZIP files for each framework
echo sourcearchive Produce ZIP file of the source code
echo build Compiles assemblies
echo buildtests Compiles tests
echo runtests Runs unit tests
Expand All @@ -205,7 +211,7 @@ echo doc Builds documentation
echo all Full build
echo nightlybuild Nightly build
echo installer Installer
echo label {suffix} Define build label (defaults to '(Custom Build)')
echo label {suffix} Define build label (defaults to 'PrivateBuild')
exit /b 1

:build
Expand Down
29 changes: 18 additions & 11 deletions src/NLog.proj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<BaseOutputDirectory>$(MSBuildProjectDirectory)\..\build\</BaseOutputDirectory>
<ProjectTarget Condition="'$(ProjectTarget)'==''">Build</ProjectTarget>
<FrameworksPath>$(MSBuildProjectDirectory)\Frameworks</FrameworksPath>
<BuildLabel>LocalBuild</BuildLabel>
<BuildLabel>PrivateBuild</BuildLabel>
<BuildLabel Condition=" '$(CCNetLabel)'!='' ">$(CCNetLabel)</BuildLabel>
<BuildVersion>0.0.0.0</BuildVersion>
<BuildAllFrameworks>true</BuildAllFrameworks>
Expand All @@ -26,8 +26,8 @@
<InfoZip>$(MSBuildProjectDirectory)\..\tools\zip.exe</InfoZip>
<Tar>$(MSBuildProjectDirectory)\..\tools\tar.exe</Tar>
<BZip2>$(MSBuildProjectDirectory)\..\tools\bzip2.exe</BZip2>
<Svn>svn.exe</Svn>
<ArchiveOutputPath>$(BaseOutputDirectory)Archive</ArchiveOutputPath>
<Git Condition=" '$(Git)' == '' ">git</Git>
<ArchiveOutputPath>$(BaseOutputDirectory)bin\$(Configuration)\Packages</ArchiveOutputPath>
<ConfigurationSuffix Condition="'$(Configuration)' == 'Debug'">-debug</ConfigurationSuffix>
</PropertyGroup>

Expand Down Expand Up @@ -146,8 +146,8 @@
<PropertyGroup>
<CommonProperties>BuildLabel=$(BuildLabel);BuildVersion=$(BuildVersion)</CommonProperties>
</PropertyGroup>
<MSBuild Projects="$(MSBuildProjectFile)" Targets="DeepClean;Clean;Build;Documentation;Installer;BuildTests;RunTests" Properties="Configuration=Release;$(CommonProperties)" />
<MSBuild Projects="$(MSBuildProjectFile)" Targets="Clean;Build;Documentation;Installer;BuildTests;RunTests" Properties="Configuration=Debug;$(CommonProperties)" />
<MSBuild Projects="$(MSBuildProjectFile)" Targets="DeepClean;Clean;Build;Documentation;Archive;Installer;BuildTests;RunTests" Properties="Configuration=Release;$(CommonProperties)" />
<CallTarget Targets="SourceArchive" />
</Target>

<Target Name="Rebuild" DependsOnTargets="Clean;Build">
Expand Down Expand Up @@ -329,14 +329,21 @@
<RemoveDir Directories="@(TargetFramework -> '$(BaseOutputDirectory)obj\$(Configuration)\%(Identity)')" />
</Target>

<Target Name="Archive">
<Target Name="BeforeArchive">
<PropertyGroup>
<ArchiveSuffix></ArchiveSuffix>
<ArchiveSuffix Condition=" '$(BuildLabel)' != '' ">-$(BuildLabel)</ArchiveSuffix>
</PropertyGroup>
<MakeDir Directories="$(ArchiveOutputPath)" />
<Exec Command='"$(InfoZip)" "$(ArchiveOutputPath)\NLog2%(TargetFramework.ProjectFileSuffix)$(ArchiveSuffix)$(ConfigurationSuffix).zip" NLog.*'
</Target>

<Target Name="Archive" DependsOnTargets="BeforeArchive">
<Exec Command='"$(InfoZip)" "$(ArchiveOutputPath)\NLog2%(TargetFramework.ProjectFileSuffix)$(ArchiveSuffix)$(ConfigurationSuffix).zip" NLog.* -x *Test*'
WorkingDirectory="$(BaseOutputDirectory)\bin\$(Configuration)\%(TargetFramework.Identity)" />
<RemoveDir Directories="$(ArchiveOutputPath)\sources" />
<Exec Command='$(Svn) export . "$(ArchiveOutputPath)\sources"' WorkingDirectory=".." />
<Exec Command='"$(InfoZip)" -r "..\NLog2-sources$(ArchiveSuffix).zip" *.*'
WorkingDirectory="$(ArchiveOutputPath)\sources" />
</Target>

<Target Name="SourceArchive" DependsOnTargets="BeforeArchive">
<Exec Command='"$(Git)" archive --format=zip --worktree-attributes -9 head -o build/bin/Release/Packages/NLog2.source$(ArchiveSuffix).zip' WorkingDirectory=".." />
</Target>

<ItemGroup>
Expand Down
Loading

0 comments on commit 3925129

Please sign in to comment.