Skip to content

Commit

Permalink
gitkraken-serverless: Add context menu integration
Browse files Browse the repository at this point in the history
  • Loading branch information
BanHammerYKT committed Oct 7, 2024
1 parent 63cc3f5 commit 6507d63
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
22 changes: 21 additions & 1 deletion bucket/gitkraken-serverless.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
"description": "A Git client which helps you track and manage changes to your code.",
"homepage": "https://www.gitkraken.com/",
"license": {
"identifier": "Freeware",
"identifier": "Commercial",
"url": "https://www.gitkraken.com/eula"
},
"notes": [
"Add GitKraken to directory context menu by running:",
"'reg import \"$dir\\install-context.reg\"'"
],
"architecture": {
"64bit": {
"url": "https://release.gitkraken.com/windows-standalone/gitkraken-10.4.0-full.nupkg",
Expand All @@ -20,6 +24,22 @@
"GitKraken Serverless"
]
],
"post_install": [
"$exepath = \"$dir\\gitkraken.exe\".Replace('\\', '\\\\')",
"'install-context', 'uninstall-context' | ForEach-Object {",
" if (Test-Path \"$bucketsdir\\extras\\scripts\\gitkraken\\$_.reg\") {",
" $content = Get-Content \"$bucketsdir\\extras\\scripts\\gitkraken\\$_.reg\"",
" $content = $content.Replace('$gitkraken', $exepath)",
" if ($global) {",
" $content = $content.Replace('HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE')",
" }",
" $content | Set-Content -Path \"$dir\\$_.reg\"",
" }",
"}"
],
"uninstaller": {
"script": "if ($cmd -eq 'uninstall') { reg import \"$dir\\uninstall-context.reg\" }"
},
"checkver": {
"url": "https://release.gitkraken.com/windows/RELEASES?id=gitkraken&localVersion=0&arch=amd64",
"regex": "gitkraken-([\\d.]+)-full\\.nupkg",
Expand Down
13 changes: 13 additions & 0 deletions scripts/gitkraken/install-context.reg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\Directory\shell\GitKraken]
@="Open with GitKraken"
"Icon"="$gitkraken"
[HKEY_CURRENT_USER\Software\Classes\Directory\shell\GitKraken\command]
@="\"$gitkraken\" -p \"%V\""

[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\GitKraken]
@="Open with GitKraken"
"Icon"="$gitkraken"
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\GitKraken\command]
@="\"$gitkraken\" -p \"%V\""
6 changes: 6 additions & 0 deletions scripts/gitkraken/uninstall-context.reg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Classes\Directory\shell\GitKraken]
[-HKEY_CURRENT_USER\Software\Classes\Directory\shell\GitKraken\command]
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\GitKraken]
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\GitKraken\command]

0 comments on commit 6507d63

Please sign in to comment.