You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
garble/testdata/scripts
Daniel Martí 1a3d7868d9 make "garble version" friendlier for devel builds
The proposal at https://go.dev/issue/50603 has been approved,
so Go will at some point start producing module pseudo-versions
even if the main module was built from a VCS clone.

To not wait until a future release like Go 1.20,
implement that ourselves with the help of module.PseudoVersion.

The result is a friendlier version output; what used to be

	$ go install && garble version
	mvdan.cc/garble (devel)

	Build settings:
	[...]

will now look like

	$ go install && garble version
	mvdan.cc/garble v0.0.0-20220505210747-22e3d30216be

	Build settings:
	[...]

Note that we don't use VCS tags in any way, so the prefix is hard-coded
as v0.0.0. That seems fine for development builds, and Go doesn't embed
VCS tag information in binaries anyway.

Finally, note that we start printing the module sum, as it's redundant.
The VCS commit hash, at least in git, should be unique enough.
3 years ago
..
asm.txt all: drop support for Go 1.17 4 years ago
basic.txt add missing context to two unmarshal errors 4 years ago
cgo.txt all: drop support for Go 1.17 4 years ago
crossbuild.txt all: drop support for Go 1.17 4 years ago
debugdir.txt all: drop support for Go 1.17 4 years ago
embed.txt all: drop support for Go 1.17 4 years ago
gogarble.txt all: drop support for Go 1.17 4 years ago
goversion.txt all: drop support for Go 1.17 4 years ago
help.txt make "garble version" friendlier for devel builds 3 years ago
implement.txt all: drop support for Go 1.17 4 years ago
imports.txt Fix removing named imports and fix removing imports with init() methods 4 years ago
init.txt all: drop support for Go 1.17 4 years ago
ldflags.txt all: drop support for Go 1.17 4 years ago
linkname.txt all: drop support for Go 1.17 4 years ago
literals.txt support code taking the address of a []byte literal (#530) 3 years ago
modinfo.txt all: drop support for Go 1.17 4 years ago
plugin.txt all: drop support for Go 1.17 4 years ago
position.txt all: drop support for Go 1.17 4 years ago
reflect.txt make KnownReflectAPIs aware of variadic funcs 4 years ago
reverse.txt all: drop support for Go 1.17 4 years ago
seed-cache.txt all: drop support for Go 1.17 4 years ago
seed.txt all: drop support for Go 1.17 4 years ago
syntax.txt all: drop support for Go 1.17 4 years ago
test.txt skip unnecessary "refusing to list" test errors 4 years ago
tiny.txt all: drop support for Go 1.17 4 years ago
typeparams.txt add a test with generic code 3 years ago