Skip to content

Commit 7307853

Browse files
authored
Add more explicit section for how to do file sizes and change to Ubuntu example instead of MacOS
1 parent 911f352 commit 7307853

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ There should be exactly one capture group in your regular expression (using pare
4747
The extra characters will simply be removed when comparing the values (ex. "36%" will be interpreted as "36").
4848
You'll receive an error if you mix units (ex. "1mb" and "1gb").
4949

50-
By default commitstat assumes the input is simply a number and a regex isn't needed (ex. `stat -f %z app.zip | commitstat -`).
50+
By default commitstat assumes the input is simply a number and a regex isn't needed (ex. `stat --format %s app.zip | commitstat -` on Ubuntu).
5151

5252
## GitHub Action
5353

@@ -106,6 +106,14 @@ $ go test ./... -coverprofile=coverage.out
106106
$ go tool cover -func coverage.out | commitstat - --regex "total:\s+\(statements\)\s+([\d\.]+%)" --goal increase --name coverage
107107
```
108108

109+
### File sizes
110+
111+
Report the size of a file (in bytes) using `stat` on Ubuntu (note that the options for stat can differ depending on your OS).
112+
113+
```console
114+
$ stat --format %s app.zip | commitstat -
115+
```
116+
109117
## How it works
110118

111119
Stats are stored directly in GitHub through the commit status API.

0 commit comments

Comments
 (0)