x/build/cmd/coordinator: version.sh check for custom version fails when upstream isn't set #29929
Labels
Builders
x/build issues (builders, bots, dashboards)
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
The
version.sh
file attempts to append-$USER-$(date -u +%Y-%m-%dT%H:%M:%SZ)
to theVERSION
environment variable when the working directory is dirty, or when the current commit doesn't match the remote commit:(Source: https://github.com/golang/build/blob/96be844d/cmd/coordinator/version.sh#L12-L14)
When the current branch doesn't have an upstream set (as can be the case if checking out a CL locally),
git rev-list '@{upstream}..HEAD'
exits with a non-zero exit code:As a result, the version reported at https://farmer.golang.org/ ends up being something like
93bae7b41a9a410dc6ca905034d3a49c59e10390
instead of93bae7b41a9a410dc6ca905034d3a49c59e10390-dmitshur-2019-01-25T01:16:25Z
.Pretty harmless, but should be improved, if this can be done without adding significant complexity to the bash file. Help is welcome.
The text was updated successfully, but these errors were encountered: