According to the plan listed in docs/releasing.md.
The gitMinor will keep using a "+" suffix instead for now.
Added a //TODO to deprecate gitMajor and gitMinor in a follow up.
Tested:
- Built it from the git tree:
$ make
$ _output/go/bin/kubecfg -version
Kubernetes version 0.2+, build 8d31eb03c11d4db64ae26809eef7f73070efd811
$ _output/go/bin/kubecfg -version=raw
version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-29-g8d31eb03c11d4d", GitCommit:"8d31eb03c11d4db64ae26809eef7f73070efd811", GitTreeState:"clean"}
- Built it with a direct `go install` (same as tarball):
$ GOPATH=${PWD}/_output/go:${PWD}/Godeps/_workspace go install $KUBE_GO_PACKAGE/cmd/kubecfg
$ _output/go/bin/kubecfg -version=raw
version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-dev", GitCommit:"", GitTreeState:"not a git tree"}
$ _output/go/bin/kubecfg -version
Kubernetes version 0.2+, build (unknown)
A follow up commit will address the output of the -version (without "raw") command to use gitVersion instead of Major + Minor.
Signed-off-by: Filipe Brandenburger <filbranden@google.com>
In particular, add support for -server_version=raw and use matching
format for the output of -version and -server_version.
The "normal" format is essentially defined by (version.Info) String()
method, so future updates to that method will be reflected on both.
Full version information is still available by using the "raw" flag.
Tested:
- Used cluster/kubecfg.sh to query local build and the server.
$ cluster/kubecfg.sh -version
Kubernetes version 0.2+, build 9316edfc0d2b28923fbb6eafa38458350859f926
$ cluster/kubecfg.sh -server_version
Server: Kubernetes version 0.2, build a0abb38157
$ cluster/kubecfg.sh -version=raw
version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-25-g9316edfc0d2b28", GitCommit:"9316edfc0d2b28923fbb6eafa38458350859f926", GitTreeState:"clean"}
$ cluster/kubecfg.sh -server_version=raw
version.Info{Major:"0", Minor:"2", GitVersion:"v0.2", GitCommit:"a0abb3815755d6a77eed2d07bb0aa7d255e4e769", GitTreeState:"clean"}
Fixes: #1092
Signed-off-by: Filipe Brandenburger <filbranden@google.com>
Otherwise the tree looks "dirty" after hack/install-etcd.sh is executed.
Tested:
- Ran `git status` after running `hack/install-etcd.sh`.
Signed-off-by: Filipe Brandenburger <filbranden@google.com>
This documentation covers the proposed release process that will improve
support for versioning builds from tarball.
There's also a diagram to explain how versioning works in face of other
commits being merged in parallel and the quirks of intermediate versions
close to the release window.
Addresses Issue #1226.
Signed-off-by: Filipe Brandenburger <filbranden@google.com>
This commit will be tagged with a v0.2 annotated git tag.
Tested:
- Created a git tag for it, built it and checked output of -version:
$ git tag -a -m 'Release Kubernetes v0.2' v0.2
$ make
hack/build-go.sh
Building local go components
$ _output/go/bin/kubecfg -version
Kubernetes version 0.2, build b47f9af5c9ea770973be1b001adaffbdfcb08618
$ _output/go/bin/kubecfg -version=raw
version.Info{Major:"0", Minor:"2", GitVersion:"v0.2", GitCommit:"b47f9af5c9ea770973be1b001adaffbdfcb08618", GitTreeState:"clean"}
- Made sure hack/test-go.sh and hack/test-cmd.sh still pass.
Fixes: Issue #1018
Signed-off-by: Filipe Brandenburger <filbranden@google.com>