From 2d372edcfce867083a3c488c4179dc27852c8707 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 6 Jan 2023 18:15:31 +0000 Subject: [PATCH] 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 --- .../spring-boot-cli/src/main/homebrew/spring-boot.rb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-cli/src/main/homebrew/spring-boot.rb b/spring-boot-project/spring-boot-tools/spring-boot-cli/src/main/homebrew/spring-boot.rb index b3973befc93..f3017bd67d9 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-cli/src/main/homebrew/spring-boot.rb +++ b/spring-boot-project/spring-boot-tools/spring-boot-cli/src/main/homebrew/spring-boot.rb @@ -5,16 +5,13 @@ class SpringBoot < Formula 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' - - if build.head? - depends_on 'maven' => :build - end + head 'https://github.com/spring-projects/spring-boot.git', :branch => "main" def install if build.head? - Dir.chdir('spring-boot-cli') { system 'mvn -U -DskipTests=true package' } - root = 'spring-boot-cli/target/spring-boot-cli-*-bin/spring-*' + 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