Skip to content

Commit a50fac3

Browse files
committed
git-credential-manager add linux support
Signed-off-by: Hendrik Bruinsma <hbruinsma@xs4some.nl>
1 parent 642c4ae commit a50fac3

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

Casks/g/git-credential-manager.rb

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
cask "git-credential-manager" do
22
arch arm: "arm64", intel: "x64"
3+
os macos: "osx", linux: "linux"
4+
5+
container_ext = on_system_conditional linux: "tar.gz", macos: "pkg"
36

47
version "2.7.3"
5-
sha256 arm: "9b4a4008b505a5878a4ee3e7e906b84cbc595e499d92d2c382e0a9f587a8861a",
6-
intel: "5638e6aef7dfc097ba5f9ceb6fcefaa05187859404de19a680e329bd97047f17"
8+
sha256 arm: "9b4a4008b505a5878a4ee3e7e906b84cbc595e499d92d2c382e0a9f587a8861a",
9+
intel: "5638e6aef7dfc097ba5f9ceb6fcefaa05187859404de19a680e329bd97047f17",
10+
arm64_linux: "291763d626106891d794b17bd7c02fe77c3d9924193fdde9e284d1d1f3fe5c21",
11+
x86_64_linux: "c7935c3e1b22681d56011b580086aeb6d60f3f0aaf6ef9c581480356988ff804"
712

8-
url "https://github.com/git-ecosystem/git-credential-manager/releases/download/v#{version.major_minor_patch}/gcm-osx-#{arch}-#{version.major_minor_patch}.pkg",
13+
url "https://github.com/git-ecosystem/git-credential-manager/releases/download/v#{version.major_minor_patch}/gcm-#{os}-#{arch}-#{version.major_minor_patch}.#{container_ext}",
914
verified: "github.com/git-ecosystem/git-credential-manager/"
1015
name "Git Credential Manager"
1116
desc "Cross-platform Git credential storage for multiple hosting providers"
@@ -16,16 +21,25 @@
1621
strategy :github_latest
1722
end
1823

19-
pkg "gcm-osx-#{arch}-#{version}.pkg"
24+
on_macos do
25+
pkg "gcm-osx-#{arch}-#{version}.pkg"
26+
27+
uninstall script: {
28+
executable: "/usr/local/share/gcm-core/uninstall.sh",
29+
sudo: true,
30+
},
31+
pkgutil: "com.microsoft.GitCredentialManager"
32+
33+
zap trash: [
34+
"~/Library/Preferences/git-credential-manager-ui.plist",
35+
"~/Library/Preferences/git-credential-manager.plist",
36+
]
37+
end
38+
39+
on_linux do
40+
depends_on formula: "icu4c"
2041

21-
uninstall script: {
22-
executable: "/usr/local/share/gcm-core/uninstall.sh",
23-
sudo: true,
24-
},
25-
pkgutil: "com.microsoft.GitCredentialManager"
42+
binary "git-credential-manager"
43+
end
2644

27-
zap trash: [
28-
"~/Library/Preferences/git-credential-manager-ui.plist",
29-
"~/Library/Preferences/git-credential-manager.plist",
30-
]
3145
end

0 commit comments

Comments
 (0)