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 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 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>
|
||||||
|
|
||||||
<Target Name="InitializeRepoAndDependentsRecursive">
|
<Target Name="InitializeRepoAndDependentsRecursive">
|
||||||
|
@ -56,6 +57,9 @@
|
||||||
Recursive="true"
|
Recursive="true"
|
||||||
VmrPath="$(VmrDir)"
|
VmrPath="$(VmrDir)"
|
||||||
TmpPath="$(TmpDir)"
|
TmpPath="$(TmpDir)"
|
||||||
|
InstallerPath="$(RepoRoot)"
|
||||||
|
ReadmeTemplatePath="$(MSBuildThisFileDirectory)/README.template.md"
|
||||||
|
TpnTemplatePath="$(MSBuildThisFileDirectory)/THIRD-PARTY-NOTICES.template.txt"
|
||||||
SourceMappingsPath="$(MSBuildThisFileDirectory)/source-mappings.json" />
|
SourceMappingsPath="$(MSBuildThisFileDirectory)/source-mappings.json" />
|
||||||
|
|
||||||
<Message Text=" -> Done initializing individual repositories recursively" Importance="High" />
|
<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 PackageVersion { get; set; }
|
||||||
|
|
||||||
|
public string InstallerPath { get; set; }
|
||||||
|
|
||||||
|
public string ReadmeTemplatePath { get; set; }
|
||||||
|
|
||||||
|
public string TpnTemplatePath { get; set; }
|
||||||
|
|
||||||
public bool Recursive { get; set; }
|
public bool Recursive { get; set; }
|
||||||
|
|
||||||
public VirtualMonoRepo_Initialize()
|
public VirtualMonoRepo_Initialize()
|
||||||
|
@ -54,6 +60,10 @@ public class VirtualMonoRepo_Initialize : Build.Utilities.Task, ICancelableTask
|
||||||
VmrPath = Path.GetFullPath(VmrPath);
|
VmrPath = Path.GetFullPath(VmrPath);
|
||||||
TmpPath = Path.GetFullPath(TmpPath);
|
TmpPath = Path.GetFullPath(TmpPath);
|
||||||
|
|
||||||
|
var additionalRemotes = InstallerPath == null
|
||||||
|
? Array.Empty<AdditionalRemote>()
|
||||||
|
: new[] { new AdditionalRemote("installer", InstallerPath) };
|
||||||
|
|
||||||
var vmrInitializer = _serviceProvider.Value.GetRequiredService<IVmrInitializer>();
|
var vmrInitializer = _serviceProvider.Value.GetRequiredService<IVmrInitializer>();
|
||||||
await vmrInitializer.InitializeRepository(
|
await vmrInitializer.InitializeRepository(
|
||||||
Repository,
|
Repository,
|
||||||
|
@ -61,7 +71,9 @@ public class VirtualMonoRepo_Initialize : Build.Utilities.Task, ICancelableTask
|
||||||
PackageVersion,
|
PackageVersion,
|
||||||
Recursive,
|
Recursive,
|
||||||
new NativePath(SourceMappingsPath),
|
new NativePath(SourceMappingsPath),
|
||||||
Array.Empty<AdditionalRemote>(),
|
additionalRemotes,
|
||||||
|
ReadmeTemplatePath,
|
||||||
|
TpnTemplatePath,
|
||||||
_cancellationToken.Token);
|
_cancellationToken.Token);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue