diff --git a/assets/js/application.js b/assets/js/application.js index 9701a9b6ce..b198a8b900 100644 --- a/assets/js/application.js +++ b/assets/js/application.js @@ -593,26 +593,39 @@ var Downloads = { return `${ago}, `; }, - adjustFor32BitWindows: function() { - // adjust the auto-link for Windows 32-bit setups - const is32BitWindows = window.session.browser.os === 'Windows' - && !navigator.userAgent.match(/WOW64|Win64|x64|x86_64/) - if (!is32BitWindows) return; - - const link = $('#auto-download-link'); - const version = $('#auto-download-version'); - const bitness = $('#auto-download-bitness'); - const date = $('#auto-download-date'); - if (link.length && version.length && bitness.length && date.length) { - bitness.html('32-bit'); - link.attr('href', '{{ .Site.Params.windows_installer.installer32.url }}'); - version.html('{{ .Site.Params.windows_installer.installer32.version }}'); - date.html('{{ .Site.Params.windows_installer.installer32.release_date }}'); - } + adjustForWindowsARM64: function() { + /* + * Windows/ARM64 cannot be reliably detected via the User-Agent string; + * Instead, we use the UAData, but that is not available in all browsers. + * For more details, see + * https://github.com/git-for-windows/git-for-windows.github.io/pull/61 + */ + if (!navigator.userAgentData) return; + + navigator.userAgentData.getHighEntropyValues(['architecture', 'platform', 'bitness']) + .then(function(browser) { + if ( + browser.platform !== 'Windows' + || browser.bitness !== '64' + || browser.architecture !== 'arm' + ) return; + + // adjust the auto-link for Windows/ARM64 setups + const link = $('#auto-download-link'); + const version = $('#auto-download-version'); + const architecture = $('#auto-download-architecture'); + const date = $('#auto-download-date'); + if (link.length && version.length && architecture.length && date.length) { + architecture.html('ARM64'); + link.attr('href', '{{ .Site.Params.windows_installer.installer_arm64.url }}'); + version.html('{{ .Site.Params.windows_installer.installer_arm64.version }}'); + date.html('{{ .Site.Params.windows_installer.installer_arm64.release_date }}'); + } + }) }, postProcessDownloadPage: function() { - Downloads.adjustFor32BitWindows(); + Downloads.adjustForWindowsARM64(); $('#relative-release-date').html(Downloads.postProcessReleaseDate); }, } diff --git a/content/downloads/win.html b/content/downloads/win.html index c9ebfa01b8..46fd4c98b2 100644 --- a/content/downloads/win.html +++ b/content/downloads/win.html @@ -8,26 +8,26 @@

Download for Windows

- Click here to download - the latest ({{< site-param windows_installer.installer64.version >}}) - 64-bit version of Git for Windows. + Click here to download + the latest ({{< site-param windows_installer.installer_x64.version >}}) + x64 version of Git for Windows. This is the most recent maintained build. - It was released on {{< site-param windows_installer.installer64.release_date >}}. + It was released on {{< site-param windows_installer.installer_x64.release_date >}}.

Other Git for Windows downloads

Standalone Installer

- 32-bit Git for Windows Setup. + Git for Windows/x64 Setup.

- 64-bit Git for Windows Setup. + Git for Windows/ARM64 Setup.

Portable ("thumbdrive edition")

- 32-bit Git for Windows Portable. + Git for Windows/x64 Portable.

- 64-bit Git for Windows Portable. + Git for Windows/ARM64 Portable.

Using winget tool

diff --git a/hugo.yml b/hugo.yml index 000f86d152..1964774372 100644 --- a/hugo.yml +++ b/hugo.yml @@ -42,23 +42,23 @@ params: release_date: '2021-08-30' filename: git-2.33.0-intel-universal-mavericks.dmg windows_installer: - portable32: - filename: PortableGit-2.48.1-32-bit.7z.exe - release_date: '2025-02-13' - version: 2.48.1 - url: https://github.com/git-for-windows/git/releases/download/v2.48.1.windows.1/PortableGit-2.48.1-32-bit.7z.exe - portable64: + installer_x64: + filename: Git-2.49.0-64-bit.exe + release_date: '2025-03-17' + version: 2.49.0 + url: https://github.com/git-for-windows/git/releases/download/v2.49.0.windows.1/Git-2.49.0-64-bit.exe + installer_arm64: + filename: Git-2.49.0-arm64.exe + release_date: '2025-03-17' + version: 2.49.0 + url: https://github.com/git-for-windows/git/releases/download/v2.49.0.windows.1/Git-2.49.0-arm64.exe + portable_x64: filename: PortableGit-2.49.0-64-bit.7z.exe release_date: '2025-03-17' version: 2.49.0 url: https://github.com/git-for-windows/git/releases/download/v2.49.0.windows.1/PortableGit-2.49.0-64-bit.7z.exe - installer32: - filename: Git-2.48.1-32-bit.exe - release_date: '2025-02-13' - version: 2.48.1 - url: https://github.com/git-for-windows/git/releases/download/v2.48.1.windows.1/Git-2.48.1-32-bit.exe - installer64: - filename: Git-2.49.0-64-bit.exe + portable_arm64: + filename: PortableGit-2.49.0-arm64.7z.exe release_date: '2025-03-17' version: 2.49.0 - url: https://github.com/git-for-windows/git/releases/download/v2.49.0.windows.1/Git-2.49.0-64-bit.exe + url: https://github.com/git-for-windows/git/releases/download/v2.49.0.windows.1/PortableGit-2.49.0-arm64.7z.exe diff --git a/layouts/partials/monitor.html b/layouts/partials/monitor.html index 063da4e6a7..85c0cd892e 100644 --- a/layouts/partials/monitor.html +++ b/layouts/partials/monitor.html @@ -10,7 +10,7 @@

Latest source Release

({{ .Site.Params.latest_release_date }}) - + Download Source Code
diff --git a/script/update-download-data.rb b/script/update-download-data.rb index a7821b663e..6398859409 100644 --- a/script/update-download-data.rb +++ b/script/update-download-data.rb @@ -15,7 +15,7 @@ class DownloadData # name, version, url & date with Feedzirra SOURCEFORGE_URL = "https://sourceforge.net/projects/git-osx-installer/rss?limit=20" - GIT_FOR_WINDOWS_REGEX = /^(Portable|)Git-(\d+\.\d+\.\d+(?:\.\d+)?)-(?:.+-)*(32|64)-bit(?:\..*)?\.exe/ + GIT_FOR_WINDOWS_REGEX = /^(Portable|)Git-(\d+\.\d+\.\d+(?:\.\d+)?)-(?:.+-)*(64-bit|arm64)(?:\..*)?\.exe/ GIT_FOR_WINDOWS_NAME_WITH_OWNER = "git-for-windows/git" class << self @@ -26,13 +26,14 @@ def sourceforge_project_download_url(project, filename) def update_download_windows_versions(config) files_from_github(GIT_FOR_WINDOWS_NAME_WITH_OWNER).each do |name, date, url| # Git for Windows uses the following naming system - # [Portable]Git-#.#.#.#[-dev-preview]-32/64-bit[.7z].exe + # [Portable]Git-#.#.#.#[-dev-preview]-64-bit/arm64[.7z].exe match = GIT_FOR_WINDOWS_REGEX.match(name) next unless match portable = match[1] - bitness = match[3] + architecture = match[3] + architecture = "x64" if architecture == "64-bit" # Git for windows sometimes creates extra releases all based off of the same upstream Git version # so we first want to crop versions like 2.16.1.4 to just 2.16.1 @@ -44,9 +45,9 @@ def update_download_windows_versions(config) config["windows_installer"] = {} if config["windows_installer"].nil? win_config = config["windows_installer"] if portable.empty? - key = "installer#{bitness}" + key = "installer_#{architecture}" else - key = "portable#{bitness}" + key = "portable_#{architecture}" end win_config[key] = {} if win_config[key].nil? return if version_compare(version, win_config[key]["version"]) < 0