Skip to content

go version should inform that the go binary is generated by microsoft  #262

@qmuntal

Description

@qmuntal

The go version is used to know which is the version of go binary being used and it can also discover which go version was used to generated a binary. This version is taken from a VERSION file in the root dir, and if it does not exist it is generated on the fly following this logic: https://github.com/golang/go/blob/577287728a8e8abbcbc6c96fdd49feb5a99ced0c/src/cmd/dist/build.go#L348

For example, running go version on my computers it outputs go version devel go1.18-505a7c80f2 Wed Nov 3 18:06:56 2021 -0500 windows/amd64.

We should include Microsoft-specific information in that output, such as the microsoft tag and probably a AzDO build number (when doing intermediate releases).

I propose to do it as follows:

  • microsoft/main does not have any committed VERSION file.
  • Our builders will generate on-the-fly with whatever pattern we decide IF the VERSION file does not exist. This auto-generated file will contain at least a microsoft tag and the AzDO build number.
  • We will commit a hand-made VERSION file on every release branch with at least the microsoft tag and the released version number.
  • boringcrypto and openssl branches will have a special tag that clearly identifies them

This approach has the nice property that no upstream code has to be modified as all the logic will be put on microsoft/go-infra.

(Forked from #140)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions