Giter VIP home page Giter VIP logo

Comments (12)

matm avatar matm commented on August 31, 2024 2

v1.3.1 just released and fixes this annoying issue. go install works as usual now.
Thanks for your feedback guys.

from gocov-html.

ehwg avatar ehwg commented on August 31, 2024 1

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.

YakkovHow avatar YakkovHow commented on August 31, 2024

+1

from gocov-html.

vellone-fabricio avatar vellone-fabricio commented on August 31, 2024

Same issue here

from gocov-html.

matm avatar matm commented on August 31, 2024

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.

matm avatar matm commented on August 31, 2024

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.

matm avatar matm commented on August 31, 2024

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.

obalunenko avatar obalunenko commented on August 31, 2024

@matm Adding breaking changes should increment major version rather than minor.

from gocov-html.

nkoribilli avatar nkoribilli commented on August 31, 2024

Why go installable tool requires a clone?

from gocov-html.

matm avatar matm commented on August 31, 2024

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.

matm avatar matm commented on August 31, 2024

@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.

ehwg avatar ehwg commented on August 31, 2024

Thanks for the update

from gocov-html.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.