Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ params:
hugo_version: 0.148.2
pagefind_version: 1.4.0
latest_version: 2.52.0
latest_relnote_url: https://github.com/git/git/raw/HEAD/Documentation/RelNotes/2.52.0.adoc
latest_relnote_url: https://gitlab.com/git-scm/git/-/blob/v2.52.0/Documentation/RelNotes/2.52.0.adoc
latest_release_date: '2025-11-17'
windows_installer:
installer_x64:
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/install-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h1>Install</h1>
<div class="version-badge">
Latest version: {{ site.Params.latest_version }}
(<a href="https://github.com/git/git/blob/HEAD/Documentation/RelNotes/{{ site.Params.latest_version }}.adoc">Release Notes</a>)
(<a href="https://gitlab.com/git-scm/git/-/blob/v2.52.0/Documentation/RelNotes/{{ site.Params.latest_version }}.adoc">Release Notes</a>)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, too, the hard-coded v2.52.0 revision would come back to bite you, if merged unchanged.

The natural fix would be to replace it by HEAD.

But a more fundamental question that should immediately come to your mind when you make virtually the same change in two separate places (the href value in install-header.html as well as the latest_relnote_url value in update-git-version.rb): Why is this URL defined in two separate locations? That's redundant.

In this particular instance, the obvious question is: if update-git-version.rb goes out of its way to define a global parameter latest_relnote_url in addition to latest_version, why on Earth is that latest_relnote_url parameter not used here?

Paying attention to such details and acting on them while you develop patches will automatically improve the quality of your work by ten times, I am sure.

</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions script/update-git-version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
config = YAML.load_file("hugo.yml")
config["params"] = {} if config["params"].nil?
config["params"]["latest_version"] = version
config["params"]["latest_relnote_url"] = "https://github.com/git/git/raw/HEAD/Documentation/RelNotes/#{version}.adoc"
config["params"]["latest_relnote_url"] = "https://gitlab.com/git-scm/git/-/blob/v2.52.0/Documentation/RelNotes/#{version}.adoc"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break for later versions: You are hard-coding v2.52.0 as the revision in which to look for the release notes. Naturally, this revision only contains the release notes leading up to that version, and once, say, v2.52.1 or v2.53.0 come out, the updated link will 404 because the v2.52.0 revision won't magically change to include the release notes for those new versions.

You need to either replace v2.52.0 by v#{version} (and understand what that is doing), or do the equivalent from before, i.e. point to https://gitlab.com/git-scm/git/-/blob/HEAD/Documentation/RelNotes/2.52.0.adoc.

config["params"]["latest_release_date"] = date.strftime("%Y-%m-%d")
yaml = YAML.dump(config).gsub(/ *$/, "")
File.write("hugo.yml", yaml)
File.write("hugo.yml", yaml)
Loading