Files
chromebrew/packages/github_cli.rb
2025-04-20 04:32:32 +00:00

31 lines
1.2 KiB
Ruby

require 'package'
class Github_cli < Package
description 'Official Github CLI tool'
homepage 'https://cli.github.com/'
version '2.70.0'
license 'MIT'
compatibility 'all'
source_url({
aarch64: "https://github.com/cli/cli/releases/download/v#{version}/gh_#{version}_linux_armv6.tar.gz",
armv7l: "https://github.com/cli/cli/releases/download/v#{version}/gh_#{version}_linux_armv6.tar.gz",
i686: "https://github.com/cli/cli/releases/download/v#{version}/gh_#{version}_linux_386.tar.gz",
x86_64: "https://github.com/cli/cli/releases/download/v#{version}/gh_#{version}_linux_amd64.tar.gz"
})
source_sha256({
aarch64: 'b5845b9e40a65bcc2bba8950f6be2cc312c4648c293a50881e42bd17e1553b74',
armv7l: 'b5845b9e40a65bcc2bba8950f6be2cc312c4648c293a50881e42bd17e1553b74',
i686: 'b43f56865381ac20db7e64a2fb342a22e3a05d478c6afdd2ad8b7d77181f3d57',
x86_64: '664b70c80aaddf7b45c4df890324d3876762e630cffb429971791b8e2fb2e04b'
})
no_compile_needed
no_shrink
no_strip # ./usr/local/bin/gh: 1: ./usr/local/bin/gh: Syntax error: redirection unexpected (expecting ")")
def self.install
FileUtils.install 'bin/gh', "#{CREW_DEST_PREFIX}/bin/gh", mode: 0o755
FileUtils.mv 'share', CREW_DEST_PREFIX
end
end