Giter VIP home page Giter VIP logo

Comments (3)

afbjorklund avatar afbjorklund commented on July 25, 2024

As long as the build doesn't fail, it's OK to leave it empty.

	// PreRelease is set during the build
	PreRelease = ""
	// GitCommit is set during the build
	GitCommit = "HEAD"
	// BuildTime is set during the build
	BuildTime = "<unknown>"

It looks weird, but 70's seems to be "industry standard".

Like podman:

    "GitCommit": "",
    "BuiltTime": "Thu Jan  1 01:00:00 1970",
    "Built": 0,

The current build works OK when git is missing, but fails (wrong repo!) when the build files are using git themselves.

So in order to not have the build pick up the version of the OS or whatever, it is more explicit to provide the information.

from cri-dockerd.

afbjorklund avatar afbjorklund commented on July 25, 2024

So these values are recorded, and provided:

REVISION=$(git log -1 --pretty=%H)
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)

To replace the default "HEAD" and "<unknown>".
eb0c48ef49856f7d098ec005ddebcae197e08e49
1641267182

from cri-dockerd.

evol262 avatar evol262 commented on July 25, 2024

REVISION, SOURCE_DATE_EPOCH, and VERSION can now be set as environment variables or build-time options to make.

There's a --buildinfo flag to cri-dockerd which will show what they were set to.

from cri-dockerd.

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.