Skip to content

Commit 599d085

Browse files
author
Mathias M
authored
Version the generated files for go install command (#48)
Fixes #47
1 parent cbd9ea7 commit 599d085

File tree

7 files changed

+421
-19
lines changed

7 files changed

+421
-19
lines changed

.github/workflows/go.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ jobs:
2121
with:
2222
go-version: 1.11
2323

24-
- name: Build code generation tool
25-
run: go build -v ./cmd/generator
26-
27-
- name: Generate code
28-
run: go generate ./...
29-
3024
- name: Build
3125
run: go build -v ./cmd/gocov-html
3226

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
*.swp
44
/*.css
55
// Generated Go files
6-
*_gen.go
76
/build
87
/dist

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
v 1.4.0
1+
v 1.3.1
2+
- Version the generated files and restore the go install command. #47
23
- Add reverse order CLI flag. #41
34
- Add a tiny Dockerfile showing the build instructions. #44
45

Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,4 @@ FROM golang:1.19-alpine3.16
22

33
RUN apk update && apk add git
44
RUN go install github.com/axw/gocov/gocov@latest
5-
RUN git clone https://github.com/matm/gocov-html.git && \
6-
cd gocov-html && \
7-
go build github.com/matm/gocov-html/cmd/generator && \
8-
go generate ./... && \
9-
go install github.com/matm/gocov-html/cmd/gocov-html
5+
RUN go install github.com/matm/gocov-html/cmd/gocov-html@latest

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@ This is a simple helper tool for generating HTML output from [axw/gocov](https:/
88

99
Binaries for most amd64 systems are built for every release. Please just [grab a binary version of the latest release](https://github.com/matm/gocov-html/releases).
1010

11-
You can also build it from source. In this case, a working Go 1.11+ compiler is required.
11+
You can also build it from source. In this case, a working Go 1.11+ compiler is required:
1212

13-
The easiest way to compile this tool is to fetch the repository's code and run `make` (which defaults to using the `build` target):
1413
```bash
15-
$ git clone https://github.com/matm/gocov-html.git
16-
$ cd gocov-html
17-
$ make
14+
$ go install github.com/matm/gocov-html/cmd/gocov-html@latest
1815
```
1916

2017
A [Dockerfile](Dockerfile) is also provided.
@@ -30,7 +27,7 @@ Embbed custom CSS into final HTML document|-|`1.2.0`
3027
List available themes|`-lt`|`1.2.0`
3128
Render with a specific theme|`-t <theme>`|`1.2.0`
3229
New `kit` theme |`-t kit`|`1.3.0`
33-
Put lower coverage functions on top|`-r`|`1.4.0`
30+
Put lower coverage functions on top|`-r`|`1.3.1`
3431

3532
## Usage
3633

pkg/themes/default_gen.go

Lines changed: 133 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/themes/kit_gen.go

Lines changed: 282 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)