Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New build file with version enforcing
- Loading branch information
Showing
1 changed file
with
59 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |