|
1 | 1 | <?xml version="1.0" encoding="utf-8"?>
|
2 | 2 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
3 |
| - <UsingTask AssemblyFile="..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.GitBlame" /> |
4 |
| - <UsingTask AssemblyFile="..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.GitBranch" /> |
5 |
| - <UsingTask AssemblyFile="..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.GitCommitHash" /> |
6 |
| - <UsingTask AssemblyFile="..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.GitCommitsInRange" /> |
| 3 | + <Import Project="..\scripts\XAVersionInfo.targets" /> |
7 | 4 | <UsingTask AssemblyFile="..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.ReplaceFileContents" />
|
8 | 5 | <PropertyGroup>
|
9 | 6 | <!-- Don't ever deploy, since that won't work on Mac -->
|
|
81 | 78 | </ItemGroup>
|
82 | 79 | </Target>
|
83 | 80 | <Target Name="GetVsixVersion"
|
84 |
| - DependsOnTargets="_GetVersionInfo" |
| 81 | + DependsOnTargets="GetXAVersionInfo" |
85 | 82 | Returns="$(VsixVersion)">
|
86 | 83 | <PropertyGroup>
|
87 | 84 | <VsixVersion>$(ProductVersion).$(_XACommitCount)</VsixVersion>
|
|
94 | 91 | <IsExperimental Condition=" '$(IsProductComponent)' == 'True' ">false</IsExperimental>
|
95 | 92 | </PropertyGroup>
|
96 | 93 | </Target>
|
97 |
| - <Target Name="_GetVersionInfo"> |
98 |
| - <GitBlame |
99 |
| - FileName="$(XamarinAndroidSourcePath)\Configuration.props" |
100 |
| - LineFilter="<ProductVersion>" |
101 |
| - WorkingDirectory="$(XamarinAndroidSourcePath)" |
102 |
| - ToolPath="$(GitToolPath)" |
103 |
| - ToolExe="$(GitToolExe)"> |
104 |
| - <Output TaskParameter="Commits" ItemName="_XAVersionCommit" /> |
105 |
| - </GitBlame> |
106 |
| - <GitCommitsInRange |
107 |
| - StartCommit="%(_XAVersionCommit.CommitHash)" |
108 |
| - WorkingDirectory="$(XamarinAndroidSourcePath)" |
109 |
| - ToolPath="$(GitToolPath)" |
110 |
| - ToolExe="$(GitToolExe)"> |
111 |
| - <Output TaskParameter="CommitCount" PropertyName="_XACommitCount" /> |
112 |
| - </GitCommitsInRange> |
113 |
| - <GitCommitHash |
114 |
| - WorkingDirectory="$(XamarinAndroidSourcePath)" |
115 |
| - ToolPath="$(GitToolPath)" |
116 |
| - ToolExe="$(GitToolExe)"> |
117 |
| - <Output TaskParameter="AbbreviatedCommitHash" PropertyName="_XAHash" /> |
118 |
| - </GitCommitHash> |
119 |
| - <GitBranch |
120 |
| - WorkingDirectory="$(XamarinAndroidSourcePath)" |
121 |
| - ToolPath="$(GitToolPath)" |
122 |
| - ToolExe="$(GitToolExe)"> |
123 |
| - <Output TaskParameter="Branch" PropertyName="_XABranch" /> |
124 |
| - </GitBranch> |
125 |
| - </Target> |
126 | 94 | <Target Name="_CreateDependencies"
|
127 |
| - DependsOnTargets="_GetVersionInfo" |
| 95 | + DependsOnTargets="GetXAVersionInfo" |
128 | 96 | BeforeTargets="Build"
|
129 | 97 | Inputs="Xamarin.Android.Sdk.pkgdef.in"
|
130 | 98 | Outputs="Xamarin.Android.Sdk.pkgdef">
|
131 | 99 | <ReplaceFileContents
|
132 | 100 | SourceFile="Xamarin.Android.Sdk.pkgdef.in"
|
133 | 101 | DestinationFile="Xamarin.Android.Sdk.pkgdef"
|
134 |
| - Replacements="@PACKAGE_VERSION@=$(ProductVersion);@PACKAGE_VERSION_BUILD@=$(_XACommitCount);@PACKAGE_HEAD_REV@=$(_XAHash);@PACKAGE_HEAD_BRANCH@=$(_XABranch)"> |
| 102 | + Replacements="@PACKAGE_VERSION@=$(ProductVersion);@PACKAGE_VERSION_BUILD@=$(XAVersionCommitCount);@PACKAGE_HEAD_REV@=$(XAVersionHash);@PACKAGE_HEAD_BRANCH@=$(XAVersionBranch)"> |
135 | 103 | </ReplaceFileContents>
|
136 | 104 | </Target>
|
137 |
| - <Target Name="_CopyToBuildConfiguration" |
138 |
| - DependsOnTargets="_GetVersionInfo" |
139 |
| - Inputs="$(OutputPath)$(AssemblyName).vsix" |
140 |
| - Outputs="..\..\bin\Build$(Configuration)\$(AssemblyName).vsix"> |
| 105 | + <Target Name="_GetVsixPath" |
| 106 | + DependsOnTargets="GetXAVersionInfo"> |
141 | 107 | <PropertyGroup>
|
142 |
| - <_Branch>$(_XABranch.Replace ('/', '-'))</_Branch> |
| 108 | + <_Branch>$(XAVersionBranch.Replace ('/', '-'))</_Branch> |
143 | 109 | <_Branch>$(_Branch.Replace ('\', '-'))</_Branch>
|
144 | 110 | </PropertyGroup>
|
| 111 | + <PropertyGroup> |
| 112 | + <VsixPath Condition=" '$(VsixPath)' == '' ">..\..\bin\Build$(Configuration)\$(AssemblyName)-$(ProductVersion).$(XAVersionCommitCount)_$(XAVersionBranch)_$(XAVersionHash).vsix</VsixPath> |
| 113 | + </PropertyGroup> |
| 114 | + </Target> |
| 115 | + <Target Name="_CopyToBuildConfiguration" |
| 116 | + DependsOnTargets="_GetVsixPath" |
| 117 | + Inputs="$(OutputPath)$(AssemblyName).vsix" |
| 118 | + Outputs="$(VsixPath)"> |
145 | 119 | <Copy
|
146 | 120 | SourceFiles="$(OutputPath)$(AssemblyName).vsix"
|
147 |
| - DestinationFiles="..\..\bin\Build$(Configuration)\$(AssemblyName)-$(ProductVersion).$(_XACommitCount)_$(_Branch)_$(_XAHash).vsix" |
| 121 | + DestinationFiles="$(VsixPath)" |
148 | 122 | />
|
149 | 123 | </Target>
|
150 | 124 | </Project>
|
0 commit comments