diff --git a/src/Microsoft.SourceIndexer.Tasks/GenerateVmrRepoTags.cs b/src/Microsoft.SourceIndexer.Tasks/GenerateVmrRepoTags.cs
index 067291a..12e2349 100644
--- a/src/Microsoft.SourceIndexer.Tasks/GenerateVmrRepoTags.cs
+++ b/src/Microsoft.SourceIndexer.Tasks/GenerateVmrRepoTags.cs
@@ -13,7 +13,8 @@ namespace Microsoft.SourceIndexer.Tasks
// /repoPath tagging, not /serverPath, so files still link back to dotnet/dotnet.
public class GenerateVmrRepoTags : Task
{
- // Full path to the extracted VMR's src/source-manifest.json.
+ // Path to the VMR's source-manifest.json, fetched at the pinned commit by the build (the
+ // extracted bundle can be a partial vertical whose manifest is missing or incomplete).
[Required]
public string ManifestPath { get; set; }
@@ -45,8 +46,9 @@ private void ExecuteCore()
if (!File.Exists(ManifestPath))
{
- // Non-VMR builds (or a manifest that moved) simply produce no sub-tags.
- Log.LogMessage(MessageImportance.Normal, $"Source manifest '{ManifestPath}' not found; no sub-repo tags generated.");
+ // A VMR entry that opted into sub-tagging but has no manifest is a misconfiguration
+ // worth surfacing, not a silent no-op.
+ Log.LogWarning($"Source manifest '{ManifestPath}' not found; no sub-repo tags generated.");
return;
}
@@ -74,7 +76,7 @@ private void ExecuteCore()
}
RepoTags = tags.ToArray();
- Log.LogMessage(MessageImportance.Normal, $"Generated {tags.Count} sub-repo tag(s) from '{ManifestPath}'.");
+ Log.LogMessage(MessageImportance.High, $"Generated {tags.Count} sub-repo tag(s) for the VMR.");
}
// Turns a clone URL into an owner/repo tag, matching the RepoDisplayName convention used for
diff --git a/src/SourceBrowser/src/HtmlGenerator/Program.cs b/src/SourceBrowser/src/HtmlGenerator/Program.cs
index 145a67a..3bc7fcc 100644
--- a/src/SourceBrowser/src/HtmlGenerator/Program.cs
+++ b/src/SourceBrowser/src/HtmlGenerator/Program.cs
@@ -699,14 +699,14 @@ private static string GetSourceBrowserVersion()
return assembly.GetName().Version?.ToString() ?? "unknown";
}
- // The generated site can run either through SourceIndexServer (which serves wwwroot/scripts.js
- // as its baseline, byte-identical to the checked-in template) or as pure static files, where
- // the copy under index/ -- and, at runtime, SourceIndexServer's own RootPath handler, which is
- // registered ahead of its wwwroot handler -- is what's actually served. Both toggles below
- // used to independently re-read wwwroot/scripts.js and overwrite index/scripts.js, which meant
- // combining them (a federation alongside /showBranding) silently discarded whichever ran first.
- // They're composed into one read-modify sequence here so any combination of flags ends up in
- // the final file.
+ // scripts.js exists in two places in the generated output: wwwroot/ (the byte-identical checked-in
+ // template) and index/ (the finalized site under RootPath). The federation and /showBranding toggles
+ // below both read wwwroot/scripts.js and rewrite the placeholders. They must be written back to BOTH
+ // copies: SourceIndexServer's RootPath handler serves index/scripts.js when reachable, but the proxy
+ // deployment (Helpers.ServeProxiedIndex) deliberately serves scripts.js and the other chrome locally
+ // from wwwroot -- so writing only index/scripts.js let /showBranding (and federation URLs) silently
+ // fall back to the un-rewritten wwwroot copy on source.dot.net. Composed into one read-modify sequence
+ // so any combination of flags ends up in both files.
private static void ApplyScriptsJsCustomizations(string destinationFolder, Federation federation, bool showBranding)
{
var source = Path.Combine(destinationFolder, "wwwroot/scripts.js");
@@ -745,8 +745,8 @@ private static void ApplyScriptsJsCustomizations(string destinationFolder, Feder
if (changed)
{
- var dst = Path.Combine(destinationFolder, "index/scripts.js");
- File.WriteAllText(dst, text);
+ File.WriteAllText(source, text);
+ File.WriteAllText(Path.Combine(destinationFolder, "index/scripts.js"), text);
}
}
}
diff --git a/src/index/index.proj b/src/index/index.proj
index 079d932..d689caa 100644
--- a/src/index/index.proj
+++ b/src/index/index.proj
@@ -118,6 +118,7 @@
%(Url)/tree/$(CommitHash)/
$([System.String]::Copy('%(Url)').Replace('https://github.com/', ''))
+ $(CommitHash)
@@ -180,12 +181,33 @@
+ source links keep pointing at the top-level repo.
+
+ The stage1 bundle doesn't ship the VMR's src/source-manifest.json (it's not a project file),
+ so grab just that file from git at the pinned commit -- a treeless, single-file partial fetch,
+ keyed to the full dotnet-dotnet vertical's SHA (never dotnet-dotnet-windows). -->
+
+ <_ManifestDir>$(RepositoryPath)%(ClonedRepositoryV2.Identity)-manifest
+
+
+
+
+
+
+