Browse files

Updated to the latest build scripts

  • Loading branch information...
1 parent 6e1253f commit 57035b1759f41543919606cf4c950a09688d4009 @remogloor remogloor committed Apr 26, 2011
Showing with 53 additions and 16 deletions.
  1. +1 −0 Ninject.build
  2. +49 −15 Ninject.include
  3. BIN logos/Ninject-Logo100.png
  4. BIN logos/Ninject-Logo32.png
  5. +3 −1 nuget/Ninject.nuspec
View
1 Ninject.build
@@ -11,6 +11,7 @@
<include buildfile="Ninject.include" />
<target name="all" depends="core csl test silverlight-test"/>
+ <target name="nuget-all" depends="nuget"/>
<target name="core" depends="init">
<csc noconfig="true" warnaserror="true" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}" output="${current.path.build}/${product.assembly}" doc="${current.path.build}/${product.docfile}" keyfile="${path.src}/${product.keyfile}">
View
64 Ninject.include
@@ -25,6 +25,7 @@
<property name="product.assembly.silverlighttest" value="${product.name}.SilverlightTests.xap" overwrite="false"/>
<property name="product.assembly.silverlighttestdll" value="${product.name}.SilverlightTests.dll" overwrite="false"/>
<property name="product.additionalVersionTag" value="" overwrite="false"/>
+ <property name="product.clsCompliant" value="true" overwrite="false"/>
<property name="version.major" value="${version::get-major(version::parse(version))}" dynamic="true"/>
<property name="version.minor" value="${version::get-minor(version::parse(version))}" dynamic="true"/>
@@ -130,7 +131,7 @@
<attribute type="AssemblyVersionAttribute" value="${build.assemblyversion}"/>
<attribute type="AssemblyFileVersionAttribute" value="${build.version}" unless="${build.platform == 'netcf-3.5'}"/>
<attribute type="ComVisibleAttribute" value="false"/>
- <attribute type="CLSCompliantAttribute" value="true"/>
+ <attribute type="CLSCompliantAttribute" value="true" if="${product.clsCompliant}"/>
</attributes>
</asminfo>
</target>
@@ -322,7 +323,7 @@
<call target="package-bin"/>
</foreach>
<call target="package-source"/>
- <call target="nuget"/>
+ <call target="nuget-all"/>
</target>
<target name="package-bin" depends="create-assembly-info all">
@@ -374,19 +375,32 @@
<delete file="${temp.revision.file}" failonerror="false"/>
</target>
- <target name="nuget" description="Copies the nuget output to the top bin directory" >
+ <target name="nuget">
<property name="nuget.sourcedir" value="${path.base}/nuget" />
<property name="nuget.basedir" value="${path.base}/build/nuget" />
- <delete dir="nuget.basedir"/>
+ <property name="nuget.platforms" value="${product.platforms}" />
+ <property name="nuget.name" value="${product.name}" />
+ <property name="nuget.releaseDirectory" value="${path.build}\${build.platform}\release" dynamic="true"/>
+ <property name="nuget.dependencies" value="${dependencies}" />
+ <property name="nuget.additionalFiles" value="-" />
+
+ <call target="nuget-run"/>
+ </target>
+
+ <target name="nuget-run" depends="get-git-revision" description="Copies the nuget output to the top bin directory">
+ <delete dir="${nuget.basedir}"/>
+ <property name="nuget.platform" value=""/>
- <foreach item="String" in="${product.platforms}" delim="," property="platform">
+ <call target="config-build-${build.config}"/>
+ <foreach item="String" in="${nuget.platforms}" delim="," property="platform">
<property name="build.platform" value="${platform}"/>
<call target="config-platform-${build.platform}"/>
<copy overwrite="false" todir="${nuget.basedir}\lib\${nuget.platform}" flatten="true" if="${nuget.add}">
- <fileset basedir="${path.build}\${build.platform}\release">
- <include name="${product.name}.dll" />
- <include name="${product.name}.xml" />
- <include name="${product.name}.pdb" />
+ <fileset basedir="${nuget.releaseDirectory}">
+ <include name="${nuget.name}.dll" />
+ <include name="${nuget.name}.xml" />
+ <include name="${nuget.name}.pdb" />
+ <include name="${nuget.additionalFiles}" unless="${nuget.additionalFiles == '-'}"/>
</fileset>
</copy>
</foreach>
@@ -403,17 +417,37 @@
</fileset>
</copy>
- <xmlpoke file="${nuget.basedir}/${product.name}.nuspec" xpath="//package/nu:metadata/nu:version" value="${build.version}">
+ <xmlpoke file="${nuget.basedir}/${nuget.name}.nuspec" xpath="//package/nu:metadata/nu:version" value="${build.version}">
<namespaces>
<namespace prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance" />
<namespace prefix="xsd" uri="http://www.w3.org/2001/XMLSchema" />
<namespace prefix="nu" uri="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" />
</namespaces>
</xmlpoke>
- <foreach item="String" in="${dependencies}" delim="," property="dependency">
- <property name="asm" value="${path.lib}\${dependency}\net-4.0\${dependency}.dll"/>
- <xmlpoke file="${nuget.basedir}/${product.name}.nuspec" xpath="//package/nu:metadata/nu:dependencies/nu:dependency[@id='${dependency}']/@version" value="${assemblyname::get-version(assemblyname::get-assembly-name(asm))}">
+ <foreach item="String" in="${nuget.dependencies}" delim="," property="dependency">
+ <property name="asm1" value="${path.lib}\${dependency}\net-4.0\${dependency}.dll"/>
+ <property name="asm2" value="${nuget.releaseDirectory}\${dependency}.dll"/>
+ <property name="asm3" value="${nuget.releaseDirectory}\lib\${dependency}.dll"/>
+ <property name="asm" value="${asm3}" if="${file::exists(asm3)}"/>
+ <property name="asm" value="${asm2}" if="${file::exists(asm2)}"/>
+ <property name="asm" value="${asm1}" if="${file::exists(asm1)}"/>
+
+ <property name="version" value="${assemblyname::get-version(assemblyname::get-assembly-name(asm))}"/>
+ <property name="maxVersion" value=""/>
+ <property name="i" value="0"/>
+ <foreach item="String" in="${version}" delim="." property="versionPart">
+ <property name="i" value="${int::parse(i) + 1}"/>
+ <property name="maxVersion" value="${maxVersion + '.'}" unless="${i == '1'}"/>
+ <property name="maxVersion" value="${maxVersion + versionPart}" if="${i == '1'}"/>
+ <property name="maxVersion" value="${maxVersion + int::to-string(int::parse(versionPart) + 1)}" if="${i == '2'}"/>
+ <property name="maxVersion" value="${maxVersion + '0'}" if="${i == '3'}"/>
+ <property name="maxVersion" value="${maxVersion + '0'}" if="${i == '4'}"/>
+ </foreach>
+
+ <xmlpoke file="${nuget.basedir}/${nuget.name}.nuspec"
+ xpath="//package/nu:metadata/nu:dependencies/nu:dependency[@id='${dependency}']/@version"
+ value="${'[' + version + ',' + maxVersion + ')'}">
<namespaces>
<namespace prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance" />
<namespace prefix="xsd" uri="http://www.w3.org/2001/XMLSchema" />
@@ -422,11 +456,11 @@
</xmlpoke>
</foreach>
- <exec program="${path.tools.nuget}" workingdir="${nuget.basedir}" commandline="pack ${nuget.basedir}\${product.name}.nuspec" />
+ <exec program="${path.tools.nuget}" workingdir="${nuget.basedir}" commandline="pack ${nuget.basedir}\${nuget.name}.nuspec" />
<move todir="${path.dist}\NuGet\">
<fileset basedir="${nuget.basedir}">
<include name="*.nupkg" />
</fileset>
</move>
- </target>
+ </target>
</project>
View
BIN logos/Ninject-Logo100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN logos/Ninject-Logo32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
4 nuget/Ninject.nuspec
@@ -7,7 +7,9 @@
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<licenseUrl>https://github.com/ninject/ninject/raw/master/LICENSE.txt</licenseUrl>
<description>Stop writing monolithic applications that make you feel like you have to move mountains to make the simplest of changes. Ninject helps you use the technique of dependency injection to break your applications into loosely-coupled, highly-cohesive components, and then glue them back together in a flexible manner.</description>
- <summary>Stop writing monolithic applications that make you feel like you have to move mountains to make the simplest of changes. Ninject helps you use the technique of dependency injection to break your applications into loosely-coupled, highly-cohesive components, and then glue them back together in a flexible manner.</summary>
<language>en-US</language>
+ <tags>Ninject ioc di</tags>
+ <iconUrl>https://github.com/ninject/ninject/raw/master/logos/Ninject-Logo32.png</iconUrl>
+ <projectUrl>http://www.ninject.org</projectUrl>
</metadata>
</package>

0 comments on commit 57035b1

Please sign in to comment.