Permalink
Browse files

New build file with version enforcing

  • Loading branch information...
1 parent d75ed3a commit aade638378a5a12ac15309c2c4c3a589c4c9f3b3 @serialseb serialseb committed May 16, 2012
Showing with 59 additions and 48 deletions.
  1. +59 −48 build/build.proj
View
@@ -1,49 +1,60 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="3.5" InitialTargets="_Initialize">
- <PropertyGroup>
- <OpenWrap-BuildTasksDirectory>$(MSBuildProjectDirectory)\..\wraps\openwrap\build</OpenWrap-BuildTasksDirectory>
- </PropertyGroup>
-
- <Target Name="_Initialize">
-
- <!-- Initializes the environment and remote repositories -->
-
- <InitializeOpenWrap CurrentDirectory="$(MSBuildProjectDirectory)\..\" CurrentProjectFile="$(MSBuildProjectFullPath)">
- <Output TaskParameter="Name" PropertyName="OpenWrap-PackageName" />
- </InitializeOpenWrap>
-
-
- </Target>
- <Target Name="Build" DependsOnTargets="_Initialize">
-
-
- <!-- Builds the package -->
-
- <RunCommand
- Verb="build"
- Noun="wrap">
- </RunCommand>
-
-
- </Target>
-
- <Target Name="Publish" DependsOnTargets="Build">
-
- <!-- Deploys the package -->
-
-
- <PropertyGroup>
- <PublishArguments>
- <Name>$(OpenWrap-PackageName)</Name>
- <Remote>file://galaxy.caffeine-it.net/packages</Remote>
- </PublishArguments>
- </PropertyGroup>
-
-
- <RunCommand
- Verb="publish"
- Noun="wrap"
- Args="$(PublishArguments)" />
- </Target>
- <Import Project="..\wraps\openwrap\build\OpenWrap.tasks"/>
+<?xml version="1.0" encoding="utf-8" ?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="3.5">
+ <PropertyGroup>
+ <OpenWrap-BuildTasksDirectory>$(MSBuildProjectDirectory)\..\wraps\openwrap\build</OpenWrap-BuildTasksDirectory>
+ </PropertyGroup>
+
+ <Target Name="_Initialize">
+
+ <!-- Initializes the environment and remote repositories -->
+
+ <InitializeOpenWrap CurrentDirectory="$(MSBuildProjectDirectory)\..\" CurrentProjectFile="$(MSBuildProjectFullPath)">
+ <Output TaskParameter="Name" PropertyName="OpenWrap-PackageName" />
+ </InitializeOpenWrap>
+
+ </Target>
+
+
+ <PropertyGroup>
+ <BuildArgs Condition="'$(BUILD_NUMBER)' != ''">
+ <BuildCounter>%BUILD_NUMBER%</BuildCounter>
+ </BuildArgs>
+ </PropertyGroup>
+
+ <Target Name="Build" DependsOnTargets="_Initialize">
+
+
+ <!-- Builds the package -->
+
+ <RunCommand
+ Verb="build"
+ Noun="wrap"
+ Args="$(BuildArgs)"
+ Capture="PackageBuilt.Version">
+ <Output TaskParameter="Captures" ItemName="Captured" />
+ </RunCommand>
+
+
+ <Message Importance="High" Text="##teamcity[buildNumber '@(Captured)']" Condition="'$(BUILD_NUMBER)' != '' and '%(Property)' == 'PackageBuilt.Version'" />
+ </Target>
+
+ <Target Name="Publish" DependsOnTargets="Build">
+
+ <!-- Deploys the package -->
+
+
+ <PropertyGroup>
+ <PublishArguments>
+ <Name>$(OpenWrap-PackageName)</Name>
+ <RemoteRepository>file://galaxy.caffeine-it.net/packages</RemoteRepository>
+ </PublishArguments>
+ </PropertyGroup>
+
+
+ <RunCommand
+ Verb="publish"
+ Noun="wrap"
+ Args="$(PublishArguments)" />
+ </Target>
+ <Import Project="..\wraps\openwrap\build\OpenWrap.tasks"/>
</Project>

0 comments on commit aade638

Please sign in to comment.