Skip to content

Commit f15a77d

Browse files
authored
Drop MacOS installer for real (#2104)
## Changes - Removes remaining metadata and tooling for the now-obsolete Git for MacOS installer. ## Context This is a tidy up after #2072 removed the link from the site.
2 parents 69e22e8 + b59e17a commit f15a77d

File tree

3 files changed

+1
-51
lines changed

3 files changed

+1
-51
lines changed

hugo.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ params:
4040
latest_version: 2.51.2
4141
latest_relnote_url: https://github.com/git/git/raw/HEAD/Documentation/RelNotes/2.51.2.adoc
4242
latest_release_date: '2025-10-27'
43-
macos_installer:
44-
url: https://sourceforge.net/projects/git-osx-installer/files/git-2.33.0-intel-universal-mavericks.dmg/download?use_mirror=autoselect
45-
version: 2.33.0
46-
release_date: '2021-08-30'
47-
filename: git-2.33.0-intel-universal-mavericks.dmg
4843
windows_installer:
4944
installer_x64:
5045
filename: Git-2.51.2-64-bit.exe

layouts/partials/monitor.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h4> Latest source Release </h4>
1010
<span class="release-date">
1111
({{ .Site.Params.latest_release_date }})
1212
</span>
13-
<span data-mac="{{ .Site.Params.macos_installer.version }}" data-win="{{ .Site.Params.windows_installer.installer_x64.version }}" id="installer-version"></span>
13+
<span data-win="{{ .Site.Params.windows_installer.installer_x64.version }}" id="installer-version"></span>
1414

1515
<a href="https://www.kernel.org/pub/software/scm/git/" class="button" id="download-link">Download Source Code</a>
1616
</div>

script/update-download-data.rb

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,10 @@ class DownloadData
1313
# [OvD] note that Google uses Atom & Sourceforge uses RSS
1414
# however this isn't relevant when parsing the feeds for
1515
# name, version, url & date with Feedzirra
16-
SOURCEFORGE_URL = "https://sourceforge.net/projects/git-osx-installer/rss?limit=20"
17-
1816
GIT_FOR_WINDOWS_REGEX = /^(Portable|)Git-(\d+\.\d+\.\d+(?:\.\d+)?)-(?:.+-)*(64-bit|arm64)(?:\..*)?\.exe/
1917
GIT_FOR_WINDOWS_NAME_WITH_OWNER = "git-for-windows/git"
2018

2119
class << self
22-
def sourceforge_project_download_url(project, filename)
23-
"https://sourceforge.net/projects/#{project}/files/#{filename}/download?use_mirror=autoselect"
24-
end
25-
2620
def update_download_windows_versions(config)
2721
files_from_github(GIT_FOR_WINDOWS_NAME_WITH_OWNER).each do |name, date, url|
2822
# Git for Windows uses the following naming system
@@ -61,32 +55,6 @@ def update_download_windows_versions(config)
6155
end
6256
end
6357

64-
def update_download_mac_versions(config)
65-
files_from_sourceforge(SOURCEFORGE_URL).each do |url, date|
66-
filename = url.split("/")[-2]
67-
match = /git-(.*?)-/.match(filename)
68-
69-
next unless match
70-
71-
url = sourceforge_project_download_url("git-osx-installer", filename)
72-
name = match[1]
73-
74-
version = name
75-
76-
if version
77-
config["macos_installer"] = {} if config["macos_installer"].nil?
78-
mac_config = config["macos_installer"]
79-
return if version_compare(version, mac_config["version"]) < 0
80-
mac_config["filename"] = filename
81-
mac_config["release_date"] = Time.parse(date.iso8601).strftime("%Y-%m-%d")
82-
mac_config["version"] = version
83-
mac_config["url"] = url
84-
else
85-
$logger.info("Could not find version #{name}")
86-
end
87-
end
88-
end
89-
9058
private
9159

9260
def files_from_github(repository)
@@ -109,18 +77,6 @@ def files_from_github(repository)
10977
downloads
11078
end
11179

112-
def files_from_sourceforge(repository)
113-
downloads = []
114-
rss = URI.parse(repository).open.read
115-
feed = RSS::Parser.parse(rss)
116-
117-
feed.items.each do |item|
118-
downloads << [item.link, item.pubDate]
119-
end
120-
121-
downloads
122-
end
123-
12480
def version_compare(a, b)
12581
a = a.nil? ? [] : a.gsub(/^v/, "").split(/[.()]/)
12682
b = b.nil? ? [] : b.gsub(/^v/, "").split(/[.()]/)
@@ -139,6 +95,5 @@ def version_compare(a, b)
13995
config = YAML.load_file("hugo.yml")
14096
config["params"] = {} if config["params"].nil?
14197
DownloadData.update_download_windows_versions(config["params"])
142-
DownloadData.update_download_mac_versions(config["params"])
14398
yaml = YAML.dump(config).gsub(/ *$/, "")
14499
File.write("hugo.yml", yaml)

0 commit comments

Comments
 (0)