mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-05-01 03:00:26 -04:00
* Add unbuilt acquia_cli to updater-acquia_cli-2.46.0 * updater-acquia_cli-2.46.0: Build Run on linux/amd64. * updater-acquia_cli-2.46.0: Build Run on linux/arm/v7. --------- Co-authored-by: satmandu <satmandu@users.noreply.github.com> Co-authored-by: chromebrew-actions[bot] <chromebrew-actions[bot]@users.noreply.github.com>
30 lines
1.1 KiB
Ruby
30 lines
1.1 KiB
Ruby
require 'package'
|
|
|
|
class Acquia_cli < Package
|
|
description 'Acquia CLI - The official command-line tool for interacting with the Drupal Cloud Platform and services.'
|
|
homepage 'https://github.com/acquia/cli'
|
|
version '2.46.0'
|
|
license 'GPL-2.0'
|
|
compatibility 'aarch64 armv7l x86_64'
|
|
source_url "https://github.com/acquia/cli/releases/download/#{version}/acli.phar"
|
|
source_sha256 'dc7385f8ed3c656f69d42ab8a23733cb35c237f1c01c1b77e5abe70361e1ed5e'
|
|
|
|
depends_on 'php83' unless File.exist? "#{CREW_PREFIX}/bin/php"
|
|
|
|
no_compile_needed
|
|
|
|
def self.preflight
|
|
major = `php -v 2> /dev/null | head -1 | cut -d' ' -f2 | cut -d'.' -f1`
|
|
minor = `php -v 2> /dev/null | head -1 | cut -d' ' -f2 | cut -d'.' -f2`
|
|
abort "acli requires php >= 8.2. php#{major.chomp}#{minor.chomp} does not meet the minimum requirement.".lightred unless major.empty? || minor.empty? || ((major.to_i >= 8) && (minor.to_i >= 2))
|
|
end
|
|
|
|
def self.install
|
|
FileUtils.install 'acli.phar', "#{CREW_DEST_PREFIX}/bin/acli", mode: 0o755
|
|
end
|
|
|
|
def self.postinstall
|
|
ExitMessage.add "\nType 'acli' to get started.\n"
|
|
end
|
|
end
|