Stephen 92e43b179b
git@2.39.2.windows.1: Add .reg scripts (#4462) (#4538)
Changes:
- Adds two .reg scripts:
  1. install-context.reg
     adds context-menu entries for 'Git GUI Here' and 'Git Bash Here'
  2. install-file-associations.reg
     associates .git* files as plain-text, and associates .sh with Bash

Notes:
- Closes: #4462
- The file-naming convention and post-install script were based on the
  `7zip.json`, `vim.json` and `pwsh.json` manifest files.
- The registry keys set by the .reg files are identical to those set by
  `[install.iss][1]` in the `[git-for-windows/build-extra][2]` repo.

[1]: <https://github.com/git-for-windows/build-extra/blobl/main/installer/install.iss>
[2]: <https://github.com/git-for-windows/build-extra>
2023-03-12 12:42:06 +05:30

81 lines
3.0 KiB
JSON

{
"version": "2.39.2.windows.1",
"description": "Distributed version control system",
"homepage": "https://gitforwindows.org",
"license": "GPL-2.0-only",
"notes": [
"Set Git Credential Manager Core by running: \"git config --global credential.helper manager\"",
"",
"To add context menu entries, run '$dir\\install-context.reg'",
"",
"To create file-associations for .git* and .sh files, run '$dir\\install-file-associations.reg'"
],
"architecture": {
"64bit": {
"url": "https://github.com/git-for-windows/git/releases/download/v2.39.2.windows.1/PortableGit-2.39.2-64-bit.7z.exe#/dl.7z",
"hash": "20e3959d4e310a79b5cf4138797aa247d473d1f7b077a6c433cbfc4ddc5486f1"
},
"32bit": {
"url": "https://github.com/git-for-windows/git/releases/download/v2.39.2.windows.1/PortableGit-2.39.2-32-bit.7z.exe#/dl.7z",
"hash": "84ea6be01df896f6d50192ba4cda85c38ab995154f7aa9d3849492a15f21b500"
}
},
"post_install": [
"'install-context', 'uninstall-context', 'install-file-associations', 'uninstall-file-associations' | ForEach-Object {",
" $reg_file_in = \"$bucketsdir\\main\\scripts\\git\\$_.reg\"",
" $reg_file_out = \"$dir\\$_.reg\"",
" $git_root = \"$dir\".Replace('\\', '\\\\')",
" if (Test-Path $reg_file_in) {",
" $content = Get-Content $reg_file_in",
" $content = $content.Replace('$git_root', $git_root)",
" if ($global) {",
" $content = $content.Replace('HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE')",
" }",
" Set-Content -Path $reg_file_out -Value $content -Encoding Ascii",
" }",
"}"
],
"bin": [
"bin\\sh.exe",
"bin\\bash.exe",
"cmd\\git.exe",
"cmd\\gitk.exe",
"cmd\\git-gui.exe",
"cmd\\scalar.exe",
"usr\\bin\\tig.exe",
"git-bash.exe"
],
"shortcuts": [
[
"git-bash.exe",
"Git Bash",
"--cd-to-home"
],
[
"cmd\\git-gui.exe",
"Git GUI"
]
],
"env_set": {
"GIT_INSTALL_ROOT": "$dir"
},
"checkver": {
"github": "https://github.com/git-for-windows/git",
"regex": "v([\\w.]+)/PortableGit-(?<full>[\\w.]+)-64-bit"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/git-for-windows/git/releases/download/v$version/PortableGit-$matchFull-64-bit.7z.exe#/dl.7z"
},
"32bit": {
"url": "https://github.com/git-for-windows/git/releases/download/v$version/PortableGit-$matchFull-32-bit.7z.exe#/dl.7z"
}
},
"hash": {
"url": "https://github.com/git-for-windows/git/releases/tag/v$version",
"regex": "<td>$basename</td>\\s*<td>$sha256</td>"
}
}
}