Skip to content

Commit d83fded

Browse files
committed
docs: improve documentation for brew releasing
1 parent 2fa36a7 commit d83fded

File tree

11 files changed

+42
-42
lines changed

11 files changed

+42
-42
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Example usage:
3434
```shell
3535
spotless --target '**/src/**/*.java' \
3636
google-java-format \
37-
license-header --header='/* (c) Diffplug $YEAR */'
37+
license-header --header='/* (c) DiffPlug $YEAR */'
3838
```
3939

4040
This command formats all java files in any `src` folder with the [google-java-format](https://github.com/google/google-java-format) and adds (or updates an existing) license header.
@@ -45,13 +45,13 @@ Using the above command line you go
4545
output = [
4646
'| From this | to this |',
4747
'| --- | --- |',
48-
'| ' + image('before', 'docs/examples/intro/resized/FormattingExample.java.png') + ' | ' + image('after', 'docs/examples/intro/resized/FormattingExampleFormatted.java.png') + ' |',
48+
'| ' + image('before', 'docs/examples/intro/FormattingExample.png') + ' | ' + image('after', 'docs/examples/intro/FormattingExampleFormatted.png') + ' |',
4949
].join('\n')
5050
-->
5151

52-
| From this | to this |
53-
| ----------------------------------------------------------------- | ------------------------------------------------------------------------- |
54-
| ![before](docs/examples/intro/resized/FormattingExample.java.png) | ![after](docs/examples/intro/resized/FormattingExampleFormatted.java.png) |
52+
| From this | to this |
53+
| ---------------------------------------------------- | ------------------------------------------------------------ |
54+
| ![before](docs/examples/intro/FormattingExample.png) | ![after](docs/examples/intro/FormattingExampleFormatted.png) |
5555

5656
<!---freshmark /example_usage_before_after -->
5757

@@ -60,7 +60,11 @@ output = [
6060
To install with Homebrew on macOS or Linux:
6161

6262
```shell
63-
brew install ...
63+
brew install diffplug/tap/spotless-cli
64+
65+
# or if you prefer
66+
brew tap diffplug/tap
67+
brew install spotless-cli
6468
```
6569

6670
To install with Chocolatey on Windows:
@@ -250,7 +254,7 @@ Runs license header
250254
Example usage:
251255

252256
```shell
253-
spotless --target '**/src/**/*.java' license-header --header='/* (c) Diffplug $YEAR */'
257+
spotless --target '**/src/**/*.java' license-header --header='/* (c) DiffPlug $YEAR */'
254258
```
255259

256260
### prettier

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

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,5 @@ $ 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-
4717
## Documentation
4818
`brew help`, `man brew` or check [Homebrew's documentation](https://docs.brew.sh).

build-logic/src/main/groovy/buildlogic.spotless-yaml-conventions.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44

55
spotless {
66
yaml {
7-
target '.github/workflows/*.yml'
7+
target '.github/workflows/*.yml', '*.yml'
88
prettier()
99
}
1010
}
63 KB
Loading

docs/examples/intro/FormattingExampleFormatted.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* (c) Diffplug 2025 */
1+
/* (c) DiffPlug 2025 */
22
public class FormattingExample {
33
public static void main(String[] args) {
44
int x = 10;
69.5 KB
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Creating images from example code for README.md
2+
3+
1. Navigate to [carbon.now.sh](https://carbon.now.sh/).
4+
2. Import the settings:
5+
- Click on the gear icon in the top right corner.
6+
- Click on "Misc".
7+
- Click on the "Import" button.
8+
- Select the file `carbon_settings.json` from the `docs/examples/intro` directory.
9+
10+
## Creating an image for the `FormattingExample` class
11+
1. Copy and paste the code from the `FormattingExample.java` file in the `docs/examples/intro` directory.
12+
2. Select all the text and click on the "B" button in the top right corner (for bold font).
13+
3. Click on the Down-Arrow of the "Export" button in the top right corner.
14+
4. Click on "1x".
15+
5. Edit the filename to `FormattingExample`.
16+
6. Click on "Download -> PNG".
17+
7. Move the downloaded image to the `docs/examples/intro` directory.
18+
19+
## Creating an image for the `FormattingExampleFormatted` class
20+
1. Copy and paste the code from the `FormattingExampleFormatted.java` file in the `docs/examples/intro` directory.
21+
2. Select all the text and click on the "B" button in the top right corner (for bold font).
22+
3. Click on the Down-Arrow of the "Export" button in the top right corner.
23+
4. Make sure "1x" is selected.
24+
5. Edit the filename to `FormattingExampleFormatted`.
25+
6. Click on "Download -> PNG".
26+
7. Move the downloaded image to the `docs/examples/intro` directory.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"paddingVertical":"41px","paddingHorizontal":"54px","backgroundImage":null,"backgroundImageSelection":null,"backgroundMode":"color","backgroundColor":"rgba(171,184,195,0)","dropShadow":true,"dropShadowOffsetY":"20px","dropShadowBlurRadius":"68px","theme":"shades-of-purple","windowTheme":"none","language":"text/x-java","fontFamily":"Fira Code","fontSize":"18px","lineHeight":"133%","windowControls":true,"widthAdjustment":true,"lineNumbers":false,"firstLineNumber":1,"exportSize":"1x","watermark":false,"squaredImage":false,"hiddenCharacters":false,"name":"","width":680,"highlights":null}
-49.6 KB
Binary file not shown.
-47.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)