elvish/PACKAGING.md
Qi Xiao 9ae071f987 pkg/buildinfo: Move detailed documentation to package level.
Code blocks don't work well in godoc for variables because they render the same
as the "var Name = Value" blocks themselves, resulting in a confusing look.

Also make the instructions in PACKAGING.md even briefer, now that the full
instruction is available as a continuous prose in the godoc for pkg/buildinfo.
2024-02-20 14:56:54 +00:00

781 B

Packager's Manual

The main package of Elvish is cmd/elvish, and you can build it like any other Go application.

Enhancing version information

You can set some variables in the src.elv.sh/pkg/buildinfo package using linker flags to enhance the Elvish's version information. See the package's API doc for details.

They don't affect any other aspect of Elvish's behavior, so it's infeasible to pass those linker flags, it's fine to leave them as is.

Note: The names and usage of these variables have changed several time in Elvish's history. If your build script has -ldflags '-X $symbol=$value' where $symbol is not documented in the linked API doc, those flags no longer do anything and should be removed.