-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove xcsync from SDK and install as .NET Global Tool
(cherry picked from commit 44b44a8)
- Loading branch information
Showing
15 changed files
with
65 additions
and
178 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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<Project> | ||
<Target Name="ComputeXcsyncArguments"> | ||
<PropertyGroup> | ||
<XcsyncExecute>$(DOTNET_HOST_PATH) xcsync</XcsyncExecute> | ||
<XcsyncProjectFile Condition="'$(XcsyncProjectFile)' == ''">$(MSBuildProjectFullPath)</XcsyncProjectFile> | ||
<XcsyncXcodeFolder Condition="'$(XcsyncXcodeFolder)' == ''">$(IntermediateOutputPath)xcode</XcsyncXcodeFolder> | ||
<XcsyncTargetFrameworkMoniker Condition="'$(XcsyncTargetFrameworkMoniker)' == ''">$(TargetFramework)</XcsyncTargetFrameworkMoniker> | ||
<XcsyncVerbosity Condition="'$(XcsyncVerbosity)' == ''">Diagnostic</XcsyncVerbosity> | ||
<XcsyncOpenXcode Condition="'$(XcsyncOpenXcode)' == ''">true</XcsyncOpenXcode> | ||
|
||
<XcsyncCommonArguments Condition="'$(XcsyncProjectFile)' != ''">$(XcsyncCommonArguments) -p "$(XcsyncProjectFile)"</XcsyncCommonArguments> | ||
<XcsyncCommonArguments Condition="'$(XcsyncXcodeFolder)' != ''">$(XcsyncCommonArguments) -t "$(XcsyncXcodeFolder)"</XcsyncCommonArguments> | ||
<XcsyncCommonArguments Condition="'$(XcsyncTargetFrameworkMoniker)' != ''">$(XcsyncCommonArguments) -tfm $(XcsyncTargetFrameworkMoniker)</XcsyncCommonArguments> | ||
<XcsyncCommonArguments Condition="'$(XcsyncVerbosity)' != ''">$(XcsyncCommonArguments) -v $(XcsyncVerbosity)</XcsyncCommonArguments> | ||
<XcsyncCommonArguments>$(XcsyncCommonArguments) --dotnet-path "$([System.IO.Path]::GetDirectoryName($(DOTNET_HOST_PATH)))"</XcsyncCommonArguments> | ||
|
||
<XcsyncGenerateArguments>$(XcsyncCommonArguments) --force</XcsyncGenerateArguments> | ||
<XcsyncGenerateArguments Condition="'$(XcsyncOpenXcode)' != 'false'">$(XcsyncGenerateArguments) --open</XcsyncGenerateArguments> | ||
|
||
<XcsyncSyncArguments>$(XcsyncCommonArguments)</XcsyncSyncArguments> | ||
</PropertyGroup> | ||
</Target> | ||
|
||
<Target Name="CheckXcsyncInstalled"> | ||
<Exec ContinueOnError="True" IgnoreStandardErrorWarningFormat="true" Command="$(XcsyncExecute)" ConsoleToMSBuild="true"> | ||
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/> | ||
</Exec> | ||
<Exec ContinueOnError="True" IgnoreStandardErrorWarningFormat="true" Command="$(DOTNET_HOST_PATH) tool run xcsync" Condition="'$(ErrorCode)' != '0'" ConsoleToMSBuild="true"> | ||
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/> | ||
</Exec> | ||
<Message Importance="High" Text="The xcsync tool is not installed." Condition="'$(ErrorCode)' != '0'" /> | ||
<PropertyGroup> | ||
<XcsyncInstalled Condition="'$(ErrorCode)' == '0'">True</XcsyncInstalled> | ||
<XcsyncInstalled Condition="'$(ErrorCode)' != '0'">False</XcsyncInstalled> | ||
</PropertyGroup> | ||
</Target> | ||
|
||
<Target Name="InstallXcsync" DependsOnTargets="CheckXcsyncInstalled"> | ||
<Message Importance="High" Text="Installing xcsync tool..." Condition="'$(XcsyncInstalled)' == 'False'"/> | ||
<Exec ContinueOnError="True" IgnoreStandardErrorWarningFormat="true" Command="$(DOTNET_HOST_PATH) tool install -g dotnet-xcsync --prerelease" Condition="'$(XcsyncInstalled)' == 'False'" ConsoleToMSBuild="true"> | ||
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/> | ||
</Exec> | ||
<Message Importance="High" Text="The xcsync tool could not be installed. Please install xcsync by running 'dotnet tool install -g dotnet-xcsync'." Condition="'$(ErrorCode)' != '0'" /> | ||
<PropertyGroup> | ||
<XcsyncInstalled Condition="'$(ErrorCode)' == '0'">True</XcsyncInstalled> | ||
<XcsyncInstalled Condition="'$(ErrorCode)' != '0'">False</XcsyncInstalled> | ||
</PropertyGroup> | ||
</Target> | ||
|
||
<Target Name="xcsync-generate" DependsOnTargets="ComputeXcsyncArguments;InstallXcsync"> | ||
<Message Importance="Low" Text="Executing xcsync using: $(XcsyncExecute) generate $(XcsyncGenerateArguments)" Condition="'$(XcsyncInstalled)' == 'True'" /> | ||
|
||
<Exec SessionId="$(BuildSessionId)" Command="$(XcsyncExecute) generate $(XcsyncGenerateArguments)" Condition="'$(XcsyncInstalled)' == 'True'" /> | ||
</Target> | ||
|
||
<Target Name="xcsync-sync" DependsOnTargets="ComputeXcsyncArguments;InstallXcsync"> | ||
<Message Importance="Low" Text="Executing xcsync using: $(XcsyncExecute) sync $(XcsyncSyncArguments)" Condition="'$(XcsyncInstalled)' == 'True'" /> | ||
|
||
<Exec SessionId="$(BuildSessionId)" Command="$(XcsyncExecute) sync $(XcsyncSyncArguments)" Condition="'$(XcsyncInstalled)' == 'True'" /> | ||
</Target> | ||
|
||
</Project> |
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.