Permalink
Browse files

simple build script for build server

  • Loading branch information...
1 parent 7f6f8af commit d3795eb5d6fc8d9ae74b3fd8f31a4a6914cafc54 @remcoros remcoros committed Aug 28, 2015
Showing with 12 additions and 44 deletions.
  1. +12 −44 Build.proj
View
@@ -1,65 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\.build</MSBuildCommunityTasksPath>
- </PropertyGroup>
-
- <Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.targets"/>
-
- <!-- Version Number -->
- <PropertyGroup Condition=" '$(BUILD_NUMBER)' == '' ">
- <Version>1.0.0.0</Version>
- <FileVersion>1.0.0.0</FileVersion>
- <InformationalVersion>1.0.0.0</InformationalVersion>
- </PropertyGroup>
-
- <PropertyGroup Condition=" '$(BUILD_NUMBER)' != '' ">
- <!-- Build Server Number -->
- <Version>1.0.0.0</Version>
- <FileVersion>$(BUILD_NUMBER)</FileVersion>
- <InformationalVersion>$(BUILD_NUMBER)</InformationalVersion>
+ <MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\.build</MSBuildCommunityTasksPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(BuildConfiguration)' == '' ">
<BuildConfiguration>Release</BuildConfiguration>
</PropertyGroup>
- <Target Name="Clean">
- <DeleteTree Directories="**\obj\**;**\bin\**" />
- </Target>
-
- <Target Name="Version">
- <Time>
- <Output TaskParameter="Year" PropertyName="Year" />
- </Time>
-
- <Message Text="Version: $(Version)"/>
-
- <Attrib Files="$(MSBuildProjectDirectory)\GlobalAssemblyInfo.cs" ReadOnly="False" />
-
- <AssemblyInfo CodeLanguage="CS"
- OutputFile="$(MSBuildProjectDirectory)\GlobalAssemblyInfo.cs"
- GenerateClass="true"
- AssemblyCopyright="Copyright © $(Year). All rights reserved."
- AssemblyConfiguration="$(BuildConfiguration)"
- AssemblyVersion="$(Version)"
- AssemblyFileVersion="$(FileVersion)"
- AssemblyInformationalVersion="$(InformationalVersion)" />
- </Target>
-
<!-- Projects to Build -->
<ItemGroup>
<ProjectFiles Include="$(MSBuildProjectDirectory)\**\*.sln">
<Properties>Configuration=$(BuildConfiguration)</Properties>
</ProjectFiles>
</ItemGroup>
- <Target Name="Compile" DependsOnTargets="Clean;Version">
- <MSBuild Projects="@(ProjectFiles)" />
+ <Target Name="RestorePackages">
+ <Exec Command="&quot;$(MSBuildThisFileDirectory).nuget\NuGet.exe&quot; restore &quot;%(ProjectFiles.Identity)&quot;" />
+ </Target>
+
+ <Target Name="Clean">
+ <MSBuild Targets="Clean" Projects="@(ProjectFiles)" />
</Target>
- <Target Name="Build">
- <CallTarget Targets="Compile" />
+ <Target Name="Build" DependsOnTargets="RestorePackages">
+ <MSBuild Targets="Build" Projects="@(ProjectFiles)" />
</Target>
+ <Target Name="Rebuild" DependsOnTargets="RestorePackages">
+ <MSBuild Targets="Rebuild" Projects="@(ProjectFiles)" />
+ </Target>
</Project>

0 comments on commit d3795eb

Please sign in to comment.