Skip to content

Commit 58f9aa2

Browse files
committed
chore: regenerate jreleaser templates using cli
``` jreleaser template generate -b=app --distribution=spotless-cli --distribution-type=JAVA_BINARY --packager=brew jreleaser template generate -b=app --distribution=spotless-cli --distribution-type=JAVA_BINARY --packager=jbang jreleaser template generate -b=app --distribution=spotless-cli --distribution-type=JAVA_BINARY --packager=chocolatey ```
1 parent 9894bb9 commit 58f9aa2

8 files changed

Lines changed: 126 additions & 35 deletions

File tree

app/src/jreleaser/distributions/spotless-cli/brew/README.md.tpl

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,35 @@ $ brew tap {{brewRepositoryOwner}}/{{brewRepositoryAlias}}
1414
$ brew install <formula>
1515
```
1616

17+
Invoke the following command if the formula is *not* hosted at GitHub
18+
19+
```sh
20+
brew tap {{brewRepositoryOwner}}/{{brewRepositoryName}} {{tapRepoCloneUrl}}
21+
brew install <formula>
22+
```
23+
24+
## Casks
25+
Invoke either of the following commands if the cask is hosted at GitHub
26+
27+
```sh
28+
$ brew install --cask {{brewRepositoryOwner}}/{{brewRepositoryAlias}}/<cask>
29+
```
30+
31+
Or
32+
33+
```sh
34+
$ brew tap {{brewRepositoryOwner}}/{{brewRepositoryAlias}}
35+
$ brew install --cask <cask>
36+
```
37+
38+
Invoke the following command if the cask is *not* hosted at GitHub
39+
40+
```sh
41+
brew tap {{brewRepositoryOwner}}/{{brewRepositoryName}} {{tapRepoCloneUrl}}
42+
brew install --cask <formula>
43+
```
44+
45+
If you get a dialog stating the cask is broken try installing with `--no-quarantine`.
46+
1747
## Documentation
1848
`brew help`, `man brew` or check [Homebrew's documentation](https://docs.brew.sh).

app/src/jreleaser/distributions/spotless-cli/brew/formula-multi.rb.tpl

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Push-{{distributionName}}
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
branches-ignore:
8+
- '**'
9+
10+
jobs:
11+
push:
12+
runs-on: windows-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-dotnet@v4
18+
with:
19+
dotnet-version: '5.0.x'
20+
21+
- name: Find package
22+
shell: bash
23+
run: |
24+
echo "PACKAGE_NAME=$(ls {{chocolateyPackageName}}/*.nuspec)" >> $GITHUB_ENV
25+
26+
- name: Pack
27+
shell: powershell
28+
run: |
29+
choco pack ${{=<% %>=}}{{ env.PACKAGE_NAME }}<%={{ }}=%>
30+
31+
- name: Publish
32+
shell: powershell
33+
run: |
34+
choco apikey -k ${{=<% %>=}}{{ secrets.CHOCOLATEY_API_KEY }}<%={{ }}=%> -s {{chocolateySource}}
35+
choco push $(ls *.nupkg | % {$_.FullName}) -s {{chocolateySource}}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Trigger-{{distributionName}}
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
trigger:
8+
runs-on: windows-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: actions/setup-dotnet@v4
14+
with:
15+
dotnet-version: '5.0.x'
16+
17+
- name: Find package
18+
shell: bash
19+
run: |
20+
echo "PACKAGE_NAME=$(ls {{distributionName}}/*.nuspec)" >> $GITHUB_ENV
21+
22+
- name: Pack
23+
shell: powershell
24+
run: |
25+
choco pack ${{=<% %>=}}{{ env.PACKAGE_NAME }}<%={{ }}=%>
26+
27+
- name: Publish
28+
shell: powershell
29+
run: |
30+
choco apikey -k ${{=<% %>=}}{{ secrets.CHOCOLATEY_API_KEY }}<%={{ }}=%> -s {{chocolateySource}}
31+
choco push $(ls *.nupkg | % {$_.FullName}) -s {{chocolateySource}}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# {{jreleaserCreationStamp}}
22
$tools = Split-Path $MyInvocation.MyCommand.Definition
33
$package = Split-Path $tools
4+
$app_home = Join-Path $package '{{distributionArtifactRootEntryName}}'
5+
$app_exe = Join-Path $app_home 'bin/{{distributionExecutableWindows}}'
46

57
Install-ChocolateyZipPackage `
68
-PackageName '{{chocolateyPackageName}}' `
79
-Url '{{distributionUrl}}' `
810
-Checksum '{{distributionChecksumSha256}}' `
911
-ChecksumType 'sha256' `
10-
-UnzipLocation $package
12+
-UnzipLocation $package
13+
14+
Install-BinFile -Name '{{distributionExecutableName}}' -Path $app_exe
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# {{jreleaserCreationStamp}}
2+
$tools = Split-Path $MyInvocation.MyCommand.Definition
3+
$package = Split-Path $tools
4+
$app_home = Join-Path $package '{{distributionArtifactRootEntryName}}'
5+
$app_exe = Join-Path $app_home 'bin/{{distributionExecutableWindows}}'
6+
7+
Uninstall-BinFile -Name '{{distributionExecutableName}}' -Path $app_exe
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"aliases": {
3+
"{{jbangAliasName}}": {
4+
"script-ref": "{{jbangScriptName}}.java",
5+
"description": "{{projectDescription}}"
6+
}
7+
}
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//usr/bin/env jbang "$0" "$@" ; exit $?
2+
//JAVA {{distributionJavaVersion}}+
3+
//DEPS {{jbangDistributionGA}}:{{projectVersion}}
4+
// {{jreleaserCreationStamp}}
5+
6+
public class {{jbangScriptName}} {
7+
public static void main(String... args) throws Exception {
8+
{{distributionJavaMainClass}}.main(args);
9+
}
10+
}

0 commit comments

Comments
 (0)