Comments (12)
v1.3.1 just released and fixes this annoying issue. go install
works as usual now.
Thanks for your feedback guys.
from gocov-html.
Hi @matm I tried to do the clone and generate but it did not work out of the box in my (azure)pipeline, neither with the make nor with the generate. So I went back to 1.2.0 which worked: go install github.com/matm/gocov-html/cmd/[email protected].
I would agree to keep/version the generated code. If I would like to use my own css then I would need to clone it and generate, right? I think generating the code in the pipeline again and again would not be a good option for me.
from gocov-html.
+1
from gocov-html.
Same issue here
from gocov-html.
Hi guys, not a regression.
The build instructions have changed, please look at the README file. A generator in cmd/generator
has to be built and used by a call to go generate ./...
before go build
the program. Running make
(or make build
) does the proper calls.
from gocov-html.
So a single go install
call on the repo won't work anymore. The build process now requires an extra step. This is a documented breaking change, you might want to explicitely use version 1.2.0 until you make the change:
$ go install github.com/matm/gocov-html/cmd/[email protected]
However the instructions to make the change are simple. From v1.3.0+
you can
$ git clone https://github.com/matm/gocov-html.git
$ cd gocov-html
$ make
or if you don't want to use make
:
$ git clone https://github.com/matm/gocov-html.git && \
cd gocov-html && \
go build github.com/matm/gocov-html/cmd/generator && \
go generate ./... && \
go install github.com/matm/gocov-html/cmd/gocov-html
Hope this help.
from gocov-html.
Also, a working Dockerfile
would be:
FROM golang:1.19-alpine3.16
RUN apk update && apk add git
RUN go install github.com/axw/gocov/gocov@latest
RUN git clone https://github.com/matm/gocov-html.git && \
cd gocov-html && \
go build github.com/matm/gocov-html/cmd/generator && \
go generate ./... && \
go install github.com/matm/gocov-html/cmd/gocov-html
Then
$ docker build -t tool .
$ docker run --rm tool gocov-html -h
from gocov-html.
@matm Adding breaking changes should increment major version rather than minor.
from gocov-html.
Why go installable tool requires a clone?
from gocov-html.
As proposed by @obalunenko on #38, I think it makes sense to keep/version the generated code. That would prevent breaking the go install
command.
Do you guys agree?
from gocov-html.
@ehwg I'm on it, 1.3.1 will work as usual with go install
(see #47).
If I would like to use my own css then I would need to clone it and generate, right?
No, you can use a custom CSS file using the -s
flag.
from gocov-html.
Thanks for the update
from gocov-html.
Related Issues (20)
- Last release breaks `go install` HOT 5
- New `-d` flag and custom CSS embedding
- Add support for themes
- go get fails HOT 6
- New `volt` theme HOT 2
- New `kit` theme HOT 1
- Re-enable support for older Go compilers (1.11+)
- Provide binaries for a variety of os/arch
- Makefile: fix missing version info during build
- Broken semver tag v1.2 HOT 3
- doc: fix semver in README
- refac: generate Go code to render themes HOT 23
- Add reverse order CLI flag
- Add CLI support for coverage thresholds
- Add a tiny Dockerfile showing the build instructions
- Version the generated files and restore the go install command
- Fix clean target in Makefile
- refac: remove pkg/types package
- refac: faster and cleaner code generator
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gocov-html.