From 5bdbde1a06165c0c0cf030c51dfdb78179e3cc7f Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 20 Jun 2019 23:02:00 +0200 Subject: [PATCH] Add note about including version numbers --- docs/CONTRIBUTING.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 2f2dbe8aa8d..b20f99ac896 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -85,6 +85,14 @@ To run a local "snapshot" build without publishing: If you plan to package chezmoi for your distibution, then note: +* Please set the version number, git commit, and build time in the binary. This is done by passing the linker flags: + + ``` + -X github.com/twpayne/chezmoi/cmd.VersionStr={{ .Version }} + -X github.com/twpayne/chezmoi/cmd.Commit={{ .Commit }} + -X github.com/twpayne/chezmoi/cmd.Date={{ .Date }} + ``` + * Please enable CGO, if possible. chezmoi can be built and run without CGO, but the `.chezmoi.group` template variable may not be set on some systems.