Jeff Hardy avatar Jeff Hardy committed e59ab2d

Split version stuff into its own file for easier updating

Comments (0)

Files changed (5)

 *.suo
 bin
 packages
-tests\IronPython.Zlib.dll
+tests\IronPython.Zlib.dll
+src\Version.cs

IronPython.Zlib.sln

 # Visual Studio 2008
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IronPython.Zlib", "src\IronPython.Zlib.csproj", "{BE07EA78-4A7F-41B7-AF4F-7C36CEC6FB50}"
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CE0DF1EB-9A74-4F61-A022-38ED616A5C5B}"
+	ProjectSection(SolutionItems) = preProject
+		licence.txt = licence.txt
+		readme.txt = readme.txt
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 
 task Default -Depends Build,Test
 
-task Build {
+task GenVersion {
+    $template = @"
+namespace $ProjectName
+{
+    class AssemblyInfo
+    {
+        internal const string Version = "$ProjectVersion";
+    }
+}
+"@
+    
+    $template | Out-File 'src\Version.cs'
+}
+
+task Build -Depends GenVersion {
     exec { 
         msbuild /nologo /verbosity:minimal "$ProjectPath" `
             /t:Build `

src/IronPython.Zlib.csproj

     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-      <Reference Include="IronPython, Version=2.6.10920.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-          <SpecificVersion>False</SpecificVersion>
-          <HintPath Condition="'$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0'">C:\Program Files (x86)\IronPython 2.6 for .NET 4.0\IronPython.dll</HintPath>
-          <HintPath Condition="!('$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0')">C:\Program Files (x86)\IronPython $(IronPythonVersion)\IronPython.dll</HintPath>
-      </Reference>
-      <Reference Include="IronPython.Modules, Version=2.6.10920.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-          <SpecificVersion>False</SpecificVersion>
-          <HintPath Condition="'$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0'">C:\Program Files (x86)\IronPython 2.6 for .NET 4.0\IronPython.Modules.dll</HintPath>
-          <HintPath Condition="!('$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0')">C:\Program Files (x86)\IronPython $(IronPythonVersion)\IronPython.Modules.dll</HintPath>
-      </Reference>
-      <Reference Include="Microsoft.Dynamic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-          <SpecificVersion>False</SpecificVersion>
-          <HintPath Condition="'$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0'">C:\Program Files (x86)\IronPython 2.6 for .NET 4.0\Microsoft.Dynamic.dll</HintPath>
-          <HintPath Condition="!('$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0')">C:\Program Files (x86)\IronPython $(IronPythonVersion)\Microsoft.Dynamic.dll</HintPath>
-      </Reference>
-      <Reference Include="Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-          <SpecificVersion>False</SpecificVersion>
-          <HintPath Condition="'$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0'">C:\Program Files (x86)\IronPython 2.6 for .NET 4.0\Microsoft.Scripting.dll</HintPath>
-          <HintPath Condition="!('$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0')">C:\Program Files (x86)\IronPython $(IronPythonVersion)\Microsoft.Scripting.dll</HintPath>
-      </Reference>
-      <Reference Include="Microsoft.Scripting.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" Condition="'$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' != 'v4.0'">
-          <SpecificVersion>False</SpecificVersion>
-          <HintPath>C:\Program Files (x86)\IronPython $(IronPythonVersion)\Microsoft.Scripting.Core.dll</HintPath>
-      </Reference>
-      <Reference Include="System" />
-      <!--<Reference Include="System.Numerics" Condition=" '$(TargetFrameworkVersion)' == 'v4.0' " />-->
+    <Reference Include="IronPython, Version=2.6.10920.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath Condition="'$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0'">C:\Program Files (x86)\IronPython 2.6 for .NET 4.0\IronPython.dll</HintPath>
+      <HintPath Condition="!('$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0')">C:\Program Files (x86)\IronPython $(IronPythonVersion)\IronPython.dll</HintPath>
+    </Reference>
+    <Reference Include="IronPython.Modules, Version=2.6.10920.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath Condition="'$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0'">C:\Program Files (x86)\IronPython 2.6 for .NET 4.0\IronPython.Modules.dll</HintPath>
+      <HintPath Condition="!('$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0')">C:\Program Files (x86)\IronPython $(IronPythonVersion)\IronPython.Modules.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Dynamic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath Condition="'$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0'">C:\Program Files (x86)\IronPython 2.6 for .NET 4.0\Microsoft.Dynamic.dll</HintPath>
+      <HintPath Condition="!('$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0')">C:\Program Files (x86)\IronPython $(IronPythonVersion)\Microsoft.Dynamic.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath Condition="'$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0'">C:\Program Files (x86)\IronPython 2.6 for .NET 4.0\Microsoft.Scripting.dll</HintPath>
+      <HintPath Condition="!('$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' == 'v4.0')">C:\Program Files (x86)\IronPython $(IronPythonVersion)\Microsoft.Scripting.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Scripting.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" Condition="'$(IronPythonVersion)' == '2.6' And '$(TargetFrameworkVersion)' != 'v4.0'">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files (x86)\IronPython $(IronPythonVersion)\Microsoft.Scripting.Core.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+    <!--<Reference Include="System.Numerics" Condition=" '$(TargetFrameworkVersion)' == 'v4.0' " />-->
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Compress.cs" />
     <Compile Include="Decompress.cs" />
+    <Compile Include="Version.cs" />
     <Compile Include="zlib.net\Adler32.cs" />
     <Compile Include="zlib.net\Deflate.cs" />
     <Compile Include="zlib.net\InfBlocks.cs" />
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
+</Project>

src/Properties/AssemblyInfo.cs

 // You can specify all the values or you can default the Build and Revision Numbers 
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.6.0.0")]
-[assembly: AssemblyFileVersion("2.6.0.0")]
+[assembly: AssemblyVersion(IronPython.Zlib.AssemblyInfo.Version)]
+[assembly: AssemblyFileVersion(IronPython.Zlib.AssemblyInfo.Version)]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.