Giter VIP home page Giter VIP logo

Comments (6)

kevinburke avatar kevinburke commented on June 16, 2024

You should be able to use either the --no-metadata flag or the --modtime=X flag where X is some constant timestamp.

See for example https://github.com/kevinburke/go-bindata/blob/master/testdata/Makefile#L15 (I set up the tests to ensure the generated files did not generate a Git diff)

from go-bindata.

mperham avatar mperham commented on June 16, 2024

I can't easily use either of those flags because I need the size and modtime for HTTP Content-Length and caching. These are HTTP static assets that I serve with http.FileServer.

from go-bindata.

kevinburke avatar kevinburke commented on June 16, 2024

Ah, got it, you want to avoid regenerating the output if the input hashes are the same. I already compute the hashes, it shouldn't be too crazy to support that...

from go-bindata.

kevinburke avatar kevinburke commented on June 16, 2024

I'm working on a fix, but just remembered the way I avoid this usually is by using the mtimes in a Makefile to avoid invoking go-bindata altogether, for example https://github.com/kevinburke/logrole/blob/master/Makefile#L64

from go-bindata.

kevinburke avatar kevinburke commented on June 16, 2024

I just merged a patch to kevinburke/go-bindata master, it looks good locally, though I might give it a few days before putting it in a tagged release.

from go-bindata.

jace-ys avatar jace-ys commented on June 16, 2024

I just merged a patch to kevinburke/go-bindata master, it looks good locally, though I might give it a few days before putting it in a tagged release.

I've tried running your fork, but I'm still bumping into this issue where the modTime changes when regenerating files that haven't changed, causing me to get a diff as well.

from go-bindata.

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.