-
Notifications
You must be signed in to change notification settings - Fork 3
/
spring-boot.rb
24 lines (21 loc) · 1.06 KB
/
spring-boot.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require 'formula'
class SpringBoot < Formula
homepage 'https://spring.io/projects/spring-boot'
url 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-cli/3.4.1/spring-boot-cli-3.4.1-bin.tar.gz'
version '3.4.1'
sha256 'fc2d75a11bed64cd63b6c3bd7be727c4a781cd1348855e17f76ade516448ee38'
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