Repository navigation
Expand file tree
/
Copy pathjaspr.rb
More file actions
68 lines (58 loc) · 2.14 KB
/
Copy pathjaspr.rb
File metadata and controls
68 lines (58 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
class Jaspr < Formula
desc "Stacked pull requests on GitHub"
homepage "https://github.com/MichaelSims/git-jaspr"
version "2.4.4"
license "Apache-2.0"
on_macos do
if Hardware::CPU.arm?
url "https://github.com/MichaelSims/git-jaspr/releases/download/v2.4.4/jaspr-macos-arm64"
sha256 "c76dd6ecc117758c77b70928546422afbcd90f24148337fca86f5d3ce6f40d46"
end
end
on_linux do
if Hardware::CPU.intel?
url "https://github.com/MichaelSims/git-jaspr/releases/download/v2.4.4/jaspr-linux-amd64"
sha256 "771629b48a904a8a0156f11f339fb89ac276299a564ddb3369cf5d3174553637"
end
end
resource "bash_completion" do
url "https://github.com/MichaelSims/git-jaspr/releases/download/v2.4.4/jaspr.bash"
sha256 "18b2a66f54cd2e25a6d9d98ddaf0bae8b0d66805fb3e106c6a74399a1d3ff993"
end
resource "zsh_completion" do
url "https://github.com/MichaelSims/git-jaspr/releases/download/v2.4.4/_jaspr"
sha256 "31fc222a68cdc03c8868dbf38f1effa8252a3863268214d805c7aa0f89f3ad81"
end
resource "fish_completion" do
url "https://github.com/MichaelSims/git-jaspr/releases/download/v2.4.4/jaspr.fish"
sha256 "0a2779e7158289bfae94c1c1247ea7d22460051113ef753e2d86a5610a38d7eb"
end
resource "man_page" do
url "https://github.com/MichaelSims/git-jaspr/releases/download/v2.4.4/jaspr.1"
sha256 "71fbb2baf74541491342000f90da9b4c6a97d25c6d607fe47e178f9e0fec18e9"
end
def install
if OS.mac? && Hardware::CPU.arm?
bin.install "jaspr-macos-arm64" => "jaspr"
elsif OS.linux? && Hardware::CPU.intel?
bin.install "jaspr-linux-amd64" => "jaspr"
end
# Create a symlink for backward compatibility with the old name "git-jaspr"
bin.install_symlink "jaspr" => "git-jaspr"
resource("bash_completion").stage do
bash_completion.install "jaspr.bash" => "jaspr"
end
resource("zsh_completion").stage do
zsh_completion.install "_jaspr"
end
resource("fish_completion").stage do
fish_completion.install "jaspr.fish" => "jaspr.fish"
end
resource("man_page").stage do
man1.install "jaspr.1"
end
end
test do
system "#{bin}/jaspr", "--version"
end
end