Commit Graph

5 Commits (ecd45031b8cec8322fdae58ec67341c741bd212e)

Author SHA1 Message Date
Brendan Burns b2b3d2e16b Add the 0.3-dev commit. 2014-09-19 11:15:57 -07:00
Brendan Burns 89eff1d0d8 Rev the version to 0.3 2014-09-19 10:11:03 -07:00
Filipe Brandenburger 61877f2dd0 Update version to use -dev suffix
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>
2014-09-09 15:46:20 -07:00
Filipe Brandenburger a0abb38157 Release Kubernetes v0.2
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>
2014-09-08 16:21:36 -07:00
Filipe Brandenburger b777eb19e2 Add additional ldflags constants for Kubernetes versioning
Now it is possible to push these variables through ldflags:
- gitMajor
- gitMinor
- gitVersion (from latest annotated tag, output of git describe)
- gitCommit (renamed commitFromGit, intended to have the full sha1)
- gitTreeState (either "clean" or "dirty")

These are spawned into its separate source file, since they are meant to
be updated separately when a new version is released.

Also use the notation vX.Y+ for when git information is not present.
(This is consistent with the kernel build, e.g. Linux 3.15+ means its
version is >= 3.15 and < 3.16.)

v2: Added comments to the individual fields in pkg/version/base.go

Tested:
- Built it and checked the -version output:
  $ hack/build-go.sh
  $ output/go/bin/kubelet -version
  Kubernetes version 0.1+, build c328679ef8aa

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-08-27 10:06:22 -07:00