Permalink
Browse files

Changes to build script to zip up sample into artifacts and setting u…

…p version number to pull from teamcity
  • Loading branch information...
1 parent b1f30c0 commit f796c34b0d6981d1a18803297e9fb6d613e5833c @schambers schambers committed Jun 21, 2010
View
@@ -21,7 +21,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentMigrator.MSBuild", "s
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{64A04012-A9E7-4DE9-8927-DD1DD5E2523A}"
ProjectSection(SolutionItems) = preProject
- SolutionInfo.cs = SolutionInfo.cs
+ src\SolutionInfo.cs = src\SolutionInfo.cs
EndProjectSection
EndProject
Global
View
@@ -1,11 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-[assembly: ComVisibleAttribute(false)]
-[assembly: AssemblyVersionAttribute("0.5.0.0")]
-[assembly: AssemblyFileVersionAttribute("0.5.0.0")]
-[assembly: AssemblyInformationalVersionAttribute("0.5.0.0")]
-[assembly: AssemblyCopyrightAttribute("Copyright © Sean Chambers 2008-2010")]
-[assembly: AssemblyProductAttribute("FluentMigrator")]
-[assembly: AssemblyCompanyAttribute("")]
-[assembly: AssemblyConfigurationAttribute("Debug")]
View
@@ -1,2 +1,2 @@
-@tools\nant\nant.exe -buildfile:default.build %*
+@tools\nant\nant.exe -buildfile:default.build -D:build.number=0 -D:build.config=debug %*
pause
View
@@ -5,18 +5,31 @@
<property name="path.base" value="${project::get-base-directory()}"/>
<property name="product.name" value="fluentmigrator" />
<property name="dir.bin" value="build" />
+ <property name="dir.sample" value="${path.base}\src\FluentMigrator.Example" />
<property name="path.dist" value="dist" />
<property name="build.platform" value="net-3.5" />
<property name="build.config" value="release" />
- <property name="build.version" value="0.9" />
+ <property name="major.version" value="0.9" />
+ <property name="complete.version" value="${major.version}.0.${build.number}" />
- <target name="all" depends="build package-bin package-source" />
+ <target name="all" depends="generate-version build package-bin package-source package-sample" />
<target name="clean" description="Deletes the output folders for a clean build">
<delete dir="${dir.bin}"/>
</target>
- <target name="build" description="Builds the app" depends="clean">
+ <target name="generate-version" description="Generates the AssemblyInfo.cs" depends="clean">
+ <asminfo output="${path.base}\src\SolutionInfo.cs" language="CSharp">
+ <attributes>
+ <attribute type="System.Reflection.AssemblyProductAttribute" value="FluentMigrator" />
+ <attribute type="System.Reflection.AssemblyVersionAttribute" value="${complete.version}"/>
+ <attribute type="System.Reflection.AssemblyCopyrightAttribute" value="Copyright - Sean Chambers 2008-2010" />
+ <attribute type="System.Reflection.AssemblyConfigurationAttribute" value="${build.config}" />
+ </attributes>
+ </asminfo>
+ </target>
+
+ <target name="build" description="Builds the app" depends="generate-version">
<msbuild project="FluentMigrator.sln">
<property name="Configuration" value="AutomatedRelease" />
<property name="OutDir" value="..\..\${dir.bin}\\" />
@@ -25,7 +38,7 @@
<target name="package-bin">
<mkdir dir="${path.dist}" if="${not(directory::exists(path.dist))}"/>
- <zip zipfile="${path.dist}\${product.name}-${build.version}-${build.config}-${build.platform}.zip" ziplevel="9">
+ <zip zipfile="${path.dist}\${product.name}-${major.version}-${build.config}-${build.platform}.zip" ziplevel="9">
<fileset basedir="${dir.bin}">
<include name="**/*.*"/>
</fileset>
@@ -34,7 +47,7 @@
<target name="package-source">
<mkdir dir="${path.dist}" if="${not(directory::exists(path.dist))}"/>
- <zip zipfile="${path.dist}\${product.name}-${build.version}-source.zip" ziplevel="9">
+ <zip zipfile="${path.dist}\${product.name}-${major.version}-source.zip" ziplevel="9">
<fileset basedir="${path.base}">
<include name="lib/*.*"/>
<include name="**/*.cs"/>
@@ -47,5 +60,14 @@
</fileset>
</zip>
</target>
+
+ <target name="package-sample">
+ <mkdir dir="${path.dist}" if="${not(directory::exists(path.dist))}"/>
+ <zip zipfile="${path.dist}\${product.name}-${major.version}-sample.zip" ziplevel="9">
+ <fileset basedir="${dir.sample}">
+ <include name="**/*.*"/>
+ </fileset>
+ </zip>
+ </target>
</project>
@@ -101,7 +101,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="..\..\SolutionInfo.cs">
+ <Compile Include="..\SolutionInfo.cs">
<Link>SolutionInfo.cs</Link>
</Compile>
<Compile Include="MigratorConsole.cs" />
@@ -68,7 +68,7 @@
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
- <Compile Include="..\..\SolutionInfo.cs">
+ <Compile Include="..\SolutionInfo.cs">
<Link>SolutionInfo.cs</Link>
</Compile>
<Compile Include="Migrate.cs" />
@@ -68,7 +68,7 @@
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
- <Compile Include="..\..\SolutionInfo.cs">
+ <Compile Include="..\SolutionInfo.cs">
<Link>SolutionInfo.cs</Link>
</Compile>
<Compile Include="MigrateTask.cs" />
@@ -126,7 +126,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="..\..\SolutionInfo.cs">
+ <Compile Include="..\SolutionInfo.cs">
<Link>SolutionInfo.cs</Link>
</Compile>
<Compile Include="Announcers\BaseAnnouncer.cs" />
@@ -111,7 +111,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="..\..\SolutionInfo.cs">
+ <Compile Include="..\SolutionInfo.cs">
<Link>SolutionInfo.cs</Link>
</Compile>
<Compile Include="Builders\Create\Column\ICreateColumnAsTypeOrInSchemaSyntax.cs" />
View
@@ -0,0 +1,16 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3603
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: System.Reflection.AssemblyProductAttribute("FluentMigrator")]
+[assembly: System.Reflection.AssemblyVersionAttribute("0.9.0.0")]
+[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright - Sean Chambers 2008-2010")]
+[assembly: System.Reflection.AssemblyConfigurationAttribute("debug")]
+

0 comments on commit f796c34

Please sign in to comment.