Matt Oswald avatar Matt Oswald committed 181d876

cleaned up msbuild package script some more

Comments (0)

Files changed (1)

 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="All"
+<Project DefaultTargets="Package"
          xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 
     <UsingTask
         AssemblyFile=".build\MSBuild.ExtensionPack.dll"
         TaskName="MSBuild.ExtensionPack.Compression.Zip"/>
 
-    <Target Name="Rebuild">
-        <CallTarget Targets="Clean;All" />
+    <Target Name="GetVersion">
+        <Console TaskAction="Beep" />
+        <Console TaskAction="ReadLine" UserPrompt="Enter Version String:">
+            <Output TaskParameter="UserResponse" PropertyName="VersionString" />
+        </Console>
     </Target>
 
     <Target Name="Clean">
         <RemoveDir Directories="package" />
     </Target>
 
-    <Target Name="Package">
-        <RemoveDir Directories="package" />
-
+    <Target Name="Build">
         <MSBuild Projects="xUnit++.sln"
                  Targets="Build"
                  BuildInParallel="true"
         <MSBuild Projects="xUnit++.sln"
                  Targets="Build"
                  BuildInParallel="true"
-                 Properties="Configuration=Debug;Platform=x64" />
+                 Properties="Configuration=Debug;Platform=x64"
+                 Condition="'$(Platform)'!='Win32'"/>
         <MSBuild Projects="xUnit++.sln"
                  Targets="Build"
                  BuildInParallel="true"
-                 Properties="Configuration=Release;Platform=x64" />
+                 Properties="Configuration=Release;Platform=x64"
+                 Condition="'$(Platform)'!='Win32'"/>
+    </Target>
+
+    <Target Name="Rebuild">
+        <CallTarget Targets="Clean;Build" />
+    </Target>
+
+    <Target Name="PreparePackage" DependsOnTargets="Rebuild">
+        <RemoveDir Directories="package" />
 
         <ItemGroup>
             <IncludeFiles Include="xUnit++\xUnit++\*.h" />
               DestinationFolder="package\TestAdapter\" />
     </Target>
 
-    <Target Name="GetVersion">
-        <Console TaskAction="Beep" />
-        <Console TaskAction="ReadLine" UserPrompt="Enter Version String:">
-            <Output TaskParameter="UserResponse" PropertyName="VersionString" />
-        </Console>
-    </Target>
-
-    <Target Name="Zip" DependsOnTargets="Package">
+    <Target Name="Package" DependsOnTargets="GetVersion;PreparePackage">
         <ItemGroup>
             <FilesToCompress Include="package\xUnit++\**\*" />
         </ItemGroup>
              CompressFiles="@(FilesToCompress)"
              RemoveRoot="$(MSBuildThisFileDirectory)package"
              ZipFileName="package\xUnit++.vc.$(VersionString).zip" />
+
+        <RemoveDir Directories="package/TestAdapter;package/xUnit++" />
     </Target>
 
-    <Target Name="Vsix" DependsOnTargets="Package">
+    <Target Name="Vsix" DependsOnTargets="PreparePackage">
         <ItemGroup>
             <VsixItems Include="package\TestAdapter\**\*" />
         </ItemGroup>
              RemoveRoot="$(MSBuildThisFileDirectory)package\TestAdapter"
              ZipFileName="package\xunit++.testadapter.vsix" />
     </Target>
-
-    <Target Name="All" DependsOnTargets="GetVersion;Zip;Vsix">
-        <RemoveDir Directories="package/TestAdapter;package/xUnit++" />
-    </Target>
-
 </Project>
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.