Git Product home page Git Product logo

go-stamp's People

Contributors

gebn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-stamp's Issues

Remove "on the root project" from README

Stamp uses a combination of workspace_status_command and x_defs to substitute values of Go vars at link time. Unfortunately, there does not currently appear to be a way to add keys to the workspace status from Starlark, so this must be manually configured.

First, create an executable script with the following contents somewhere in your workspace, e.g. bin/workspace_status (if you already have a workspace status script, you just need to add the three echo lines to it):

...

Fix Go modules

Such that it isn't identified as +incompatible. Even though this is a Bazel project, it could still be used by people running go tool link -X manually.

New interface for v2

import “github.com/gebn/go-stamp”

.Summary()

.CodeSummary()
.Branch
.Commit
.Version // up to build info script to set this to whatever it likes - we are VCS agnostic. Git describe is the example.

.BuildSummary()
.User
.Hostname
.Time() // can the raw string representation be made private?

Remove to need to set up a workspace_status_command

Ideally, people wanting to use the library would only have to write the go_repository rule - the library would take care of adding necessary keys to the workspace status. Volatile build variables are provided for free by Bazel, however the STABLE_GIT_ ones must be provided by us - we effectively need a way to append to bazel-out/stable-status.txt within Starlark.

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.