Skip to content

Commit

Permalink
#48 Added package creation to the build script and #20 added ILMerge …
Browse files Browse the repository at this point in the history
…support for all outputs to the build script
  • Loading branch information
Jeffrey Cameron committed Dec 13, 2011
1 parent a550971 commit 3e2b3da
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 24 deletions.
18 changes: 8 additions & 10 deletions NuGetPackAll.cmd
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
cd src\Pickles
cd Pickles
call NugetPack.cmd %1
cd ..\Pickles.CommandLine
call NugetPack.cmd
cd ..\Pickles.MsBuild
call NugetPack.cmd
cd ..\Pickles.NAnt
call NugetPack.cmd
cd \..\..
pushd src\Pickles\Pickles.CommandLine && ..\.nuget\nuget.exe pack Pickles.CommandLine.csproj -Properties Configuration=Release
popd
pushd src\Pickles\Pickles.MSBuild && ..\.nuget\nuget.exe pack Pickles.MSBuild.csproj -Properties Configuration=Release
popd
pushd src\Pickles\Pickles.NAnt && ..\.nuget\nuget.exe pack Pickles.NAnt.csproj -Properties Configuration=Release
popd
pushd src\Pickles\Pickles.PowerShell && ..\.nuget\nuget.exe pack Pickles.nuspec -Version 0.3
popd
53 changes: 40 additions & 13 deletions project.build
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@
<property name="version" value="${version.major}.${version.minor}.${build.number}.0" />
<property name="msbuild.dir" value="C:\Windows\Microsoft.NET\Framework\v4.0.30319" />
<property name="ilmerge.dir" value="${environment::get-variable('ProgramFiles')}\Microsoft\ILMerge" />
<property name="nuget.dir" value="src\Pickles\.nuget" />
<property name="framework.dir" value="${msbuild.dir}" />
<property name="assemblies.dir" value="C:\dev\pickles\src\Pickles\Pickles.CommandLine\bin\Release" />
<property name="assemblies.console.dir" value="src\Pickles\Pickles.CommandLine\bin\Release" />
<property name="assemblies.msbuild.dir" value="src\Pickles\Pickles.MSBuild\bin\Release" />
<property name="assemblies.nant.dir" value="src\Pickles\Pickles.NAnt\bin\Release" />
<property name="assemblies.powershell.dir" value="src\Pickles\Pickles.Powershell\bin\Release" />
<property name="nuspec.powershell.dir" value="src\Pickles\Pickles.PowerShell\Pickles.nuspec" />
<property name="merged.dir" value="merged" />
<property name="deploy.dir" value="deploy" />
<property name="report.dir" value="reports" />
Expand Down Expand Up @@ -70,48 +73,70 @@
</exec>
</target>

<target name="merge" depends="test">
<target name="merge" depends="build">
<delete>
<fileset>
<include name="${merged.dir}\merge.*.log" />
</fileset>
</delete>

<exec program="ilmerge.exe" basedir="${ilmerge.dir}">
<arg value="/targetplatform=v4,${framework.dir}"/>
<arg value="/out=${merged.dir}\Pickles.exe"/>
<arg value="/target=exe"/>
<arg value="/closed"/>
<arg value="/ndebug"/>
<arg value="/xmldocs"/>
<arg value="/wildcards"/>
<arg value="/allowDup"/>
<arg value="/log:${merged.dir}\merge.console.log" />
<arg value="/log:${merged.dir}\merge.exe.log" />
<arg value="${assemblies.console.dir}\Pickles.CommandLine.exe"/>
<arg value="${assemblies.console.dir}\*.dll"/>
</exec>

<exec program="ilmerge.exe" basedir="${ilmerge.dir}">
<arg value="/targetplatform=v4,${framework.dir}"/>
<arg value="/out=${merged.dir}\Pickles.MSBuild.Tasks.dll"/>
<arg value="/target=dll"/>
<arg value="/closed"/>
<arg value="/ndebug"/>
<arg value="/xmldocs"/>
<arg value="/wildcards"/>
<arg value="/allowDup"/>
<arg value="/log:${merged.dir}\merge.msbuild.log" />
<arg value="${assemblies.msbuild.dir}\Pickles.MSBuild.Tasks.dll"/>
<arg value="${assemblies.msbuild.dir}\*.dll"/>
</exec>

<exec program="ilmerge.exe" basedir="${ilmerge.dir}">
<arg value="/targetplatform=v4,${framework.dir}"/>
<arg value="/out=${merged.dir}\Pickles.NAnt.Tasks.dll"/>
<arg value="/target=dll"/>
<arg value="/closed"/>
<arg value="/ndebug"/>
<arg value="/xmldocs"/>
<arg value="/wildcards"/>
<arg value="/allowDup"/>
<arg value="/log:${merged.dir}\merge.nant.log" />
<arg value="${assemblies.nant.dir}\Pickles.NAnt.Tasks.dll"/>
<arg value="${assemblies.nant.dir}\*.dll"/>
</exec>

<exec program="ilmerge.exe" basedir="${ilmerge.dir}">
<arg value="/out=${merged.dir}\Pickles.PowerShell.dll"/>
<arg value="/target=dll"/>
<arg value="/ndebug"/>
<arg value="/wildcards"/>
<arg value="/allowDup"/>
<arg value="/log:${merged.dir}\merge.powershell.log" />
<arg value="${assemblies.powershell.dir}\Pickles.Powershell.dll"/>
<arg value="${assemblies.powershell.dir}\*.dll"/>
</exec>
</target>

<target name="pack" depends="build">
<exec program="nuget.exe" basedir="${nuget.dir}">
<arg value="Pack"/>
<arg value="-Version"/>
<arg value="${version}" />
<arg value="-OutputDirectory"/>
<arg value="${deploy.dir}"/>
<arg value="${nuspec.powershell.dir}"/>
</exec>
</target>

<target name="zip" depends="test">
<target name="zip" depends="merge">
<zip zipfile="${deploy.dir}\pickles-${version}.zip">
<fileset basedir="${assemblies.console.dir}" prefix="pickles-${version}\exe">
<include name="**/*" />
Expand All @@ -121,8 +146,10 @@
</fileset>
<fileset basedir="${assemblies.nant.dir}" prefix="pickles-${version}\nant">
<include name="**/*" />
</fileset>
<fileset basedir="${assemblies.powershell.dir}" prefix="pickles-${version}\powershell">
<include name="**/*" />
</fileset>
</zip>
</target>

</project>
Binary file modified src/Pickles/.nuget/NuGet.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Pickles/VersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

[assembly: AssemblyCompany("Pickles")]
[assembly: AssemblyProduct("Pickles")]
[assembly: AssemblyCopyright("Copyright © Jeffrey Cameron 2010-2012")]
[assembly: AssemblyCopyright("Copyright Jeffrey Cameron 2010-2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down

0 comments on commit 3e2b3da

Please sign in to comment.