k3s/pkg
Filipe Brandenburger de405ac126 Improve generation of version information from the git tree
Detect whether the tree is dirty and append a "-dirty" indication to the
git commit (common practice with other repos, e.g. kernel, docker.)

Properly handle the case where a git tree is not found (e.g. building
from archive.)

In the sed expression, look for the variable to be updated
(commitFromGit) instead of hardcoding a line number.

Tested:

- Built from a dirty tree:
    $ output/go/bin/kubelet -version
    Kubernetes version 0.1, build 2d784c684c75-dirty

- Built from a clean tree:
    $ output/go/bin/kubelet -version
    Kubernetes version 0.1, build 505f23a31172

- Built from an archive:
    $ hack/build-go.sh
    WARNING: unable to find git commit, falling back to commitFromGit = `(none)`
    $ output/go/bin/kubelet -version
    Kubernetes version 0.1, build (none)

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-07-30 18:48:57 -07:00
..
api Merge pull request #691 from dchen1107/restart 2014-07-30 15:32:20 -07:00
apiserver Merge pull request #683 from smarterclayton/slightly_pause_on_return 2014-07-30 16:05:15 -07:00
client Add /version to server and check it in client. 2014-07-28 15:45:25 -07:00
cloudprovider Don't hard code load balancer zone. 2014-07-28 15:54:16 -07:00
controller Fixing typo 2014-07-30 16:45:53 +02:00
health health: Improve test coverage 2014-07-27 08:44:59 -07:00
healthz add tests for the healthz package 2014-07-20 12:28:02 -07:00
httplog httplog: Improve test coverage 2014-07-26 21:17:10 -07:00
kubecfg Add /version to server and check it in client. 2014-07-28 15:45:25 -07:00
kubelet third_party: update go-dockerclient 2014-07-30 15:18:42 -03:00
labels Update Service and ReplControllers to validate 2014-07-27 19:55:03 -04:00
master Add master.Config type and cleanup master configuration 2014-07-26 22:07:24 -07:00
proxy Add a comment to tickle travis. 2014-07-30 15:06:56 -07:00
registry Merge pull request #571 from lavalamp/master 2014-07-29 17:19:33 -07:00
scheduler Merge branch 'master' into fix/golint 2014-07-15 20:57:47 +09:00
tools Incorporate new types into versioned api system. 2014-07-29 15:46:57 -07:00
util Add TODOs, clean up, clarify comments, and add one more test. 2014-07-27 19:32:37 -07:00
version Improve generation of version information from the git tree 2014-07-30 18:48:57 -07:00
volume volume: improve test coverage and minor refactoring 2014-07-27 14:11:19 -07:00
watch Split httpWatcher into watch.StreamWatcher and tools.APIEventDecoder. 2014-07-21 16:07:58 -07:00