Fix VMR initialization from installer (#16627)
This commit is contained in:
parent
441c290d7a
commit
6300bc3f99
2 changed files with 17 additions and 1 deletions
|
@ -31,6 +31,7 @@
|
|||
|
||||
<Exec WorkingDirectory="$(VmrDir)" Command="git init -b $(VmrDefaultBranch)" />
|
||||
<Exec WorkingDirectory="$(VmrDir)" Command="git commit --allow-empty -m 'Initial commit of the VMR%0D%0A%0D%0A[[ commit created by automation ]]'" />
|
||||
<Exec WorkingDirectory="$(VmrDir)" Command="git remote add origin https://github.com/dotnet/dotnet" /> <!-- source link needs this -->
|
||||
</Target>
|
||||
|
||||
<Target Name="InitializeRepoAndDependentsRecursive">
|
||||
|
@ -56,6 +57,9 @@
|
|||
Recursive="true"
|
||||
VmrPath="$(VmrDir)"
|
||||
TmpPath="$(TmpDir)"
|
||||
InstallerPath="$(RepoRoot)"
|
||||
ReadmeTemplatePath="$(MSBuildThisFileDirectory)/README.template.md"
|
||||
TpnTemplatePath="$(MSBuildThisFileDirectory)/THIRD-PARTY-NOTICES.template.txt"
|
||||
SourceMappingsPath="$(MSBuildThisFileDirectory)/source-mappings.json" />
|
||||
|
||||
<Message Text=" -> Done initializing individual repositories recursively" Importance="High" />
|
||||
|
|
|
@ -40,6 +40,12 @@ public class VirtualMonoRepo_Initialize : Build.Utilities.Task, ICancelableTask
|
|||
|
||||
public string PackageVersion { get; set; }
|
||||
|
||||
public string InstallerPath { get; set; }
|
||||
|
||||
public string ReadmeTemplatePath { get; set; }
|
||||
|
||||
public string TpnTemplatePath { get; set; }
|
||||
|
||||
public bool Recursive { get; set; }
|
||||
|
||||
public VirtualMonoRepo_Initialize()
|
||||
|
@ -54,6 +60,10 @@ public class VirtualMonoRepo_Initialize : Build.Utilities.Task, ICancelableTask
|
|||
VmrPath = Path.GetFullPath(VmrPath);
|
||||
TmpPath = Path.GetFullPath(TmpPath);
|
||||
|
||||
var additionalRemotes = InstallerPath == null
|
||||
? Array.Empty<AdditionalRemote>()
|
||||
: new[] { new AdditionalRemote("installer", InstallerPath) };
|
||||
|
||||
var vmrInitializer = _serviceProvider.Value.GetRequiredService<IVmrInitializer>();
|
||||
await vmrInitializer.InitializeRepository(
|
||||
Repository,
|
||||
|
@ -61,7 +71,9 @@ public class VirtualMonoRepo_Initialize : Build.Utilities.Task, ICancelableTask
|
|||
PackageVersion,
|
||||
Recursive,
|
||||
new NativePath(SourceMappingsPath),
|
||||
Array.Empty<AdditionalRemote>(),
|
||||
additionalRemotes,
|
||||
ReadmeTemplatePath,
|
||||
TpnTemplatePath,
|
||||
_cancellationToken.Token);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue