Skip to content

Commit

Permalink
Merge branch 'release/0.18.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensley committed Jan 21, 2018
2 parents eb41dd3 + eceb087 commit f135dd2
Show file tree
Hide file tree
Showing 88 changed files with 1,130 additions and 2,187 deletions.
12 changes: 12 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BasePath>$(MSBuildThisFileDirectory)</BasePath>
<BaseIntermediateOutputPath>$(BasePath)artifacts\obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<!-- RestoreProjectStyle will be supported in VS for Mac 7.4 -->
<RestoreProjectStyle Condition="'$(RestoreProjectStyle)' == '' AND $(UsePackagesConfig) != 'True'">PackageReference</RestoreProjectStyle>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Deterministic>False</Deterministic>
</PropertyGroup>
<Import Condition="Exists('$(MSBuildThisFileDirectory)..\Portable.Xaml.Common.props')" Project="$(MSBuildThisFileDirectory)..\Portable.Xaml.Common.props" />
</Project>
4 changes: 4 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Condition="Exists('$(MSBuildThisFileDirectory)..\Portable.Xaml.Common.targets')" Project="$(MSBuildThisFileDirectory)..\Portable.Xaml.Common.targets" />
</Project>
5 changes: 5 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<configuration>
<config>
<add key="repositoryPath" value="artifacts\packages" />
</config>
</configuration>
3 changes: 2 additions & 1 deletion build/build.cmd → build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ if not defined VisualStudioVersion (

:EnvSet

msbuild -t:Package Build.proj
set BUILD_DIR=%~dp0build
msbuild -t:Package "%BUILD_DIR%\Build.proj"

pause
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
msbuild /t:Package $DIR/build/Build.proj
33 changes: 15 additions & 18 deletions build/Build.proj
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Package" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="15.0" DefaultTargets="Package" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition="$(Configuration) == ''">Release</Configuration>
<Platform Condition="$(Platform) == ''">Any CPU</Platform>
<BaseDir Condition="$(BaseDir) == ''">..</BaseDir>
<SourceDir Condition="$(SourceDir) == ''">$(BaseDir)\src</SourceDir>
<NugetDir Condition="$(NugetDir) == ''">$(SourceDir)\.nuget</NugetDir>
<Nuget>$(NugetDir)\nuget.exe</Nuget>
<ArtifactsDir>$(BaseDir)/artifacts</ArtifactsDir>
<OutputNupkgDir Condition="$(OutputNupkgDir) == ''">$(ArtifactsDir)/nupkg/$(Configuration)</OutputNupkgDir>
<ArtifactsDir>$(BaseDir)\artifacts</ArtifactsDir>
<ToolsDir>$(ArtifactsDir)\tools</ToolsDir>
<Nuget>$(ToolsDir)\nuget.exe</Nuget>
<OutputNupkgDir Condition="$(OutputNupkgDir) == ''">$(ArtifactsDir)\nupkg\$(Configuration)</OutputNupkgDir>
<Runtime Condition="$(OS) == 'Unix'">mono</Runtime>
<UtilitiesBasePath>$(ArtifactsDir)\obj</UtilitiesBasePath>
</PropertyGroup>
<Import Project="Utilities.targets" />

<Target Name="Build">

<Target Name="Build" DependsOnTargets="DownloadNuget">
<Exec Command="$(Runtime) $(Nuget) restore $(SourceDir)\Portable.Xaml.sln"/>
<Exec Command="dotnet restore $(SourceDir)\Portable.Xaml\Portable.Xaml-netstandard1.3.csproj"/>
<Exec Command="dotnet restore $(SourceDir)\Test\Portable.Xaml-tests-core.csproj"/>
<MSBuild Projects="$(SourceDir)\Portable.Xaml.sln" Targets="$(PackageTargets)" Properties="Configuration=$(Configuration);Platform=$(Platform)"/>

</Target>

<Target Name="DownloadNuget" Condition="!Exists('$(Nuget)')">
<DownloadFile Address="https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" FileName="$(Nuget)" />
</Target>

<Target Name="Package" DependsOnTargets="Build;BuildUtilities">
<Target Name="Package" DependsOnTargets="Build;DownloadNuget">

<GetAssemblyInfo AssemblyFileName="$(ArtifactsDir)\$(Configuration)\pcl259\Portable.Xaml.dll">
<GetAssemblyInfo AssemblyFileName="$(ArtifactsDir)\core\$(Configuration)\netstandard1.3\Portable.Xaml.dll">
<Output TaskParameter="AssemblyInformationalVersion" PropertyName="AssemblyVersion" />
</GetAssemblyInfo>

Expand All @@ -36,18 +34,17 @@

<Target Name="Clean">
<RemoveDir Directories="$(ArtifactsDir)"/>
<RemoveDir Directories="$(SourceDir)\packages"/>
</Target>

<Target Name="_GetVersion" DependsOnTargets="BuildUtilities">
<Target Name="_GetVersion">
<FileExtract File="$(SourceDir)\Portable.Xaml\Assembly\AssemblyInfo.cs"
Pattern='(?&lt;=AssemblyInformationalVersion(\\s*)[(]&quot;).*(?=&quot;[)])'
Condition="$(BuildVersion) == ''">
<Output TaskParameter="Output" PropertyName="CurrentVersion" />
</FileExtract>
</Target>

<Target Name="UpdateVersion" DependsOnTargets="BuildUtilities;_GetVersion">
<Target Name="UpdateVersion" DependsOnTargets="_GetVersion">

<Message Text="Set Version: $(BuildVersion)" Condition="$(BuildVersion) != ''" />

Expand All @@ -68,15 +65,15 @@
<Message Text="New Informational Version: $(AssemblyInformationalVersion)" />

<FileUpdate Files="$(SourceDir)\Portable.Xaml\Assembly\AssemblyInfo.cs"
Pattern='AssemblyVersion(\\s*)[(]"."[)]'
Pattern='AssemblyVersion(\\s*)[(]&quot;.*&quot;[)]'
Replacement='AssemblyVersion$1("$(AssemblyVersion)")' />

<FileUpdate Files="$(SourceDir)\Portable.Xaml\Assembly\AssemblyInfo.cs"
Pattern='AssemblyInformationalVersion(\\s*)[(]&quot;.*&quot;[)]'
Replacement='AssemblyInformationalVersion$1(&quot;$(AssemblyInformationalVersion)&quot;)' />
</Target>

<Target Name="MakeRelease" DependsOnTargets="Clean;BuildUtilities;_GetVersion">
<Target Name="MakeRelease" DependsOnTargets="Clean;_GetVersion">
<Exec Command='git diff --quiet HEAD' IgnoreExitCode="true">
<Output TaskParameter="ExitCode" PropertyName="HasChanges" />
</Exec>
Expand Down
Loading

0 comments on commit f135dd2

Please sign in to comment.