Skip to content

Commit daccdbb

Browse files
andreysaksonovsnicoll
authored andcommitted
Add CLI manifest for Scoop
See gh-12541
1 parent f934e00 commit daccdbb

File tree

3 files changed

+95
-2
lines changed

3 files changed

+95
-2
lines changed

spring-boot-project/spring-boot-cli/pom.xml

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,16 +328,65 @@
328328
<echo
329329
message="Customizing homebrew for ${project.version} with checksum ${checksum} in ${repo} repo" />
330330
<copy file="${basedir}/src/main/homebrew/springboot.rb"
331-
tofile="${project.build.directory}/springboot.rb" overwrite="true">
331+
tofile="${project.build.directory}/homebrew/springboot.rb" overwrite="true">
332332
<filterchain>
333333
<expandproperties />
334334
</filterchain>
335335
</copy>
336-
<attachartifact file="${project.build.directory}/springboot.rb"
336+
<attachartifact file="${project.build.directory}/homebrew/springboot.rb"
337337
classifier="homebrew" type="rb" />
338338
</target>
339339
</configuration>
340340
</execution>
341+
<execution>
342+
<id>scoop</id>
343+
<phase>package</phase>
344+
<goals>
345+
<goal>run</goal>
346+
</goals>
347+
<inherited>false</inherited>
348+
<configuration>
349+
<target>
350+
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
351+
<taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask" />
352+
<var name="scoop-version" value="${project.version}" />
353+
<propertyregex property="scoop-version" override="true"
354+
input="${scoop-version}" regexp="(.*)\..*" replace="\1" />
355+
<var name="version-type" value="${project.version}" />
356+
<propertyregex property="version-type" override="true"
357+
input="${version-type}" regexp=".*\.(.*)" replace="\1" />
358+
<propertyregex property="version-type" override="true"
359+
input="${version-type}" regexp="(M)\d+" replace="MILESTONE" />
360+
<propertyregex property="version-type" override="true"
361+
input="${version-type}" regexp="(RC)\d+" replace="MILESTONE" />
362+
<propertyregex property="version-type" override="true"
363+
input="${version-type}" regexp="BUILD-(.*)" replace="SNAPSHOT" />
364+
<stringutil string="${version-type}" property="repo">
365+
<lowercase />
366+
</stringutil>
367+
<checksum algorithm="sha-256"
368+
file="${project.build.directory}/spring-boot-cli-${project.version}-bin.zip"
369+
property="hash" />
370+
<echo
371+
message="Customizing scoop for ${project.version} with hash ${hash} in ${repo} repo" />
372+
<copy file="${basedir}/src/main/scoop/springboot.json"
373+
tofile="${project.build.directory}/scoop/springboot.json" overwrite="true">
374+
<filterchain>
375+
<expandproperties>
376+
<propertyset>
377+
<propertyref name="scoop-version" />
378+
<propertyref name="hash" />
379+
<propertyref name="repo" />
380+
<propertyref name="project.version" />
381+
</propertyset>
382+
</expandproperties>
383+
</filterchain>
384+
</copy>
385+
<attachartifact file="${project.build.directory}/scoop/springboot.json"
386+
classifier="scoop" type="json" />
387+
</target>
388+
</configuration>
389+
</execution>
341390
</executions>
342391
</plugin>
343392
<plugin>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"homepage": "https://projects.spring.io/spring-boot/",
3+
"version": "${scoop-version}",
4+
"license": "Apache 2.0",
5+
"hash": "${hash}",
6+
"url": "https://repo.spring.io/${repo}/org/springframework/boot/spring-boot-cli/${project.version}/spring-boot-cli-${project.version}-bin.zip",
7+
"extract_dir": "spring-${project.version}",
8+
"bin": "bin\\spring.bat",
9+
"suggest": {
10+
"JDK": [
11+
"java/oraclejdk",
12+
"java/openjdk"
13+
]
14+
},
15+
"checkver": {
16+
"github": "https://github.com/spring-projects/spring-boot",
17+
"re": "/releases/tag/(?:v)?(2[\\d.]+)\\.RELEASE"
18+
},
19+
"autoupdate": {
20+
"url": "https://repo.spring.io/release/org/springframework/boot/spring-boot-cli/$version.RELEASE/spring-boot-cli-$version.RELEASE-bin.zip",
21+
"extract_dir": "spring-$version.RELEASE",
22+
"hash": {
23+
"url": "$url.sha256"
24+
}
25+
}
26+
}

spring-boot-project/spring-boot-docs/src/main/asciidoc/getting-started.adoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,24 @@ completion scripts are automatically registered with your shell.
387387

388388

389389

390+
[[getting-started-scoop-cli-installation]]
391+
==== Windows Scoop Installation
392+
If you are on a Windows and use http://scoop.sh/[Scoop], you can install the Spring Boot
393+
CLI by using the following commands:
394+
395+
[indent=0]
396+
----
397+
> scoop bucket add extras
398+
> scoop install springboot
399+
----
400+
401+
Scoop installs `spring` to `~/scoop/apps/springboot/current/bin`.
402+
403+
NOTE: If you do not see the app manifest, your installation of scoop might be out-of-date. In
404+
that case, run `scoop update` and try again.
405+
406+
407+
390408
[[getting-started-cli-example]]
391409
==== Quick-start Spring CLI Example
392410
You can use the following web application to test your installation. To start, create a

0 commit comments

Comments
 (0)