Files
spring-boot/spring-boot-project/spring-boot-tools/spring-boot-cli/src/main/homebrew/spring-boot.rb
Andy Wilkinson 2d372edcfc Fix Homebrew formula's install --head support
This commit updates the Homebrew formula's install --head support to
use the main branch (rather than the default of master) and to build
the project using Gradle rather than trying to use Maven.

Closes gh-33704
2023-01-06 18:15:31 +00:00

25 lines
1.0 KiB
Ruby

require 'formula'
class SpringBoot < Formula
homepage 'https://spring.io/projects/spring-boot'
url '${repo}/org/springframework/boot/spring-boot-cli/${project.version}/spring-boot-cli-${project.version}-bin.tar.gz'
version '${project.version}'
sha256 '${hash}'
head 'https://github.com/spring-projects/spring-boot.git', :branch => "main"
def install
if build.head?
system './gradlew spring-boot-project:spring-boot-tools:spring-boot-cli:tar'
system 'tar -xzf spring-boot-project/spring-boot-tools/spring-boot-cli/build/distributions/spring-* -C spring-boot-project/spring-boot-tools/spring-boot-cli/build/distributions'
root = 'spring-boot-project/spring-boot-tools/spring-boot-cli/build/distributions/spring-*'
else
root = '.'
end
bin.install Dir["#{root}/bin/spring"]
lib.install Dir["#{root}/lib/spring-boot-cli-*.jar"]
bash_completion.install Dir["#{root}/shell-completion/bash/spring"]
zsh_completion.install Dir["#{root}/shell-completion/zsh/_spring"]
end
end