forked from yanw/App_win_iot_V2.0
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
2.8 KiB
57 lines
2.8 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project>
|
|
<UsingTask TaskName="Microsoft.Build.Tasks.Git.LocateRepository" AssemblyFile="$(MicrosoftBuildTasksGitAssemblyFile)"/>
|
|
<UsingTask TaskName="Microsoft.Build.Tasks.Git.GetUntrackedFiles" AssemblyFile="$(MicrosoftBuildTasksGitAssemblyFile)"/>
|
|
|
|
<PropertyGroup>
|
|
<!--
|
|
Sets the scope of git repository configuration. By default (no scope specified) configuration is read from environment variables
|
|
and system and global user git/ssh configuration files.
|
|
|
|
If "local" is specified the configuration is only read from the configuration files local to the repository (or work tree).
|
|
In addition, any use of home relative paths in these configuration files (paths that start with '~/') is disallowed.
|
|
|
|
By default, the scope is restricted to "local" when building in CI (ContinuousIntegrationBuild is true) to avoid introducing
|
|
dependencies on CI machine state into the build.
|
|
-->
|
|
<GitRepositoryConfigurationScope Condition="'$(GitRepositoryConfigurationScope)' == '' and '$(ContinuousIntegrationBuild)' == 'true'">local</GitRepositoryConfigurationScope>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="InitializeSourceControlInformationFromSourceControlManager">
|
|
<!--
|
|
Reports a warning if the given project doesn't belong to a repository under source control.
|
|
-->
|
|
<Microsoft.Build.Tasks.Git.LocateRepository
|
|
Path="$(MSBuildProjectDirectory)"
|
|
RemoteName="$(GitRepositoryRemoteName)"
|
|
ConfigurationScope="$(GitRepositoryConfigurationScope)" >
|
|
|
|
<Output TaskParameter="RepositoryId" PropertyName="_GitRepositoryId" />
|
|
<Output TaskParameter="Url" PropertyName="ScmRepositoryUrl" />
|
|
<Output TaskParameter="Roots" ItemName="SourceRoot" />
|
|
<Output TaskParameter="RevisionId" PropertyName="SourceRevisionId" Condition="'$(SourceRevisionId)' == ''" />
|
|
</Microsoft.Build.Tasks.Git.LocateRepository>
|
|
|
|
<PropertyGroup>
|
|
<RepositoryType Condition="'$(RepositoryType)' == ''">git</RepositoryType>
|
|
</PropertyGroup>
|
|
</Target>
|
|
|
|
<!--
|
|
Embed files to the PDB that either do not belong to any of the SourceRoot directories
|
|
or belong to the source repository, but are explicitly ignored (excluded) from source control.
|
|
-->
|
|
<Target Name="SetEmbeddedFilesFromSourceControlManagerUntrackedFiles"
|
|
DependsOnTargets="InitializeSourceControlInformationFromSourceControlManager">
|
|
|
|
<Microsoft.Build.Tasks.Git.GetUntrackedFiles
|
|
RepositoryId="$(_GitRepositoryId)"
|
|
ConfigurationScope="$(GitRepositoryConfigurationScope)"
|
|
ProjectDirectory="$(MSBuildProjectDirectory)"
|
|
Files="@(Compile)">
|
|
|
|
<Output TaskParameter="UntrackedFiles" ItemName="EmbeddedFiles" />
|
|
</Microsoft.Build.Tasks.Git.GetUntrackedFiles>
|
|
</Target>
|
|
|
|
</Project>
|
|
|