Fixups to make the tarball committable (#13894) (#13994)

This commit is contained in:
Chris Rummel 2022-06-15 17:56:07 -05:00 committed by GitHub
parent 75d4c37cea
commit 6f98d9441d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,6 +124,7 @@
<TarballRepoSourceEngDir>$(TarballSourceDir)$(SourceDir)eng/</TarballRepoSourceEngDir> <TarballRepoSourceEngDir>$(TarballSourceDir)$(SourceDir)eng/</TarballRepoSourceEngDir>
<TarballVersionDetailsFile>$(TarballRepoSourceEngDir)Version.Details.xml</TarballVersionDetailsFile> <TarballVersionDetailsFile>$(TarballRepoSourceEngDir)Version.Details.xml</TarballVersionDetailsFile>
<CloneParam Condition=" '$(CloneVerbosity)' == 'quiet' ">-q</CloneParam> <CloneParam Condition=" '$(CloneVerbosity)' == 'quiet' ">-q</CloneParam>
<OriginalRepoUri>$(RepoUri)</OriginalRepoUri>
<RepoUri Condition=" '$(AzDoPat)' != '' ">$(RepoUri.Replace('https://dev.azure.com', 'https://dn-bot:$(AzDoPat)@dev.azure.com'))</RepoUri> <RepoUri Condition=" '$(AzDoPat)' != '' ">$(RepoUri.Replace('https://dev.azure.com', 'https://dn-bot:$(AzDoPat)@dev.azure.com'))</RepoUri>
</PropertyGroup> </PropertyGroup>
@ -175,10 +176,18 @@
Command="git submodule update --init --recursive --depth 1" Command="git submodule update --init --recursive --depth 1"
WorkingDirectory="$(TarballRepoSourceDir)" /> WorkingDirectory="$(TarballRepoSourceDir)" />
<Exec
Command="git config --file $(TarballRepoSourceDir)/.git/config --unset remote.origin.url"
WorkingDirectory="$(RepoRoot)"/>
<Exec
Command="git config --file $(TarballRepoSourceDir)/.git/config --add remote.origin.url $(OriginalRepoUri)"
WorkingDirectory="$(RepoRoot)"/>
<!-- Remove the git objects folder to free up tarball space --> <!-- Remove the git objects folder to free up tarball space -->
<Exec <Exec
Command="rm -rf objects" Command="rm -rf objects"
WorkingDirectory="$(TarballRepoSourceDir).git" WorkingDirectory="$(TarballRepoSourceDir).git"
Condition="$(PreserveTarballGitFolders) != 'true'" /> Condition="$(PreserveTarballGitFolders) != 'true'" />
<Message Text="--> Done Cloning Repo $(SourceBuildRepoName)" Importance="High" /> <Message Text="--> Done Cloning Repo $(SourceBuildRepoName)" Importance="High" />