contiv / netplugin

Container networking for various use cases
Apache License 2.0
513 stars 177 forks source link

version is based on git state or BUILD_VERSION #1042

Closed chrisplo closed 6 years ago

chrisplo commented 6 years ago

Git version to be calculated by 'git describe --tags --always' and add '-unsupported' when the local workspace has an uncommitted change.

the rules are:

release target will use CURRENT_VERSION to make it simple to set in the release branch

Signed-off-by: Chris Plock chrisplo@cisco.com

chrisplo commented 6 years ago

some testing results:

make release:
----
Version: 1.0.0-beta
GitCommit: 0e9fdd7-unsupported
BuildTime: 10-31-2017.23-14-26.UTC

netplugin-1.0.0-beta.tar.bz2

make tar
----
Version: 1.1.0-rc.1-207-g0e9fdd7c-unsupported
GitCommit: 0e9fdd7-unsupported
BuildTime: 10-31-2017.23-22-49.UTC

netplugin-1.1.0-rc.1-207-g0e9fdd7c-unsupported.tar.bz2

BUILD_VERSION=1.2.3 make tar
---------------------------
Version: 1.2.3
GitCommit: 0e9fdd7-unsupported
BuildTime: 10-31-2017.23-50-36.UTC

./netplugin-1.2.3.tar.bz2

make compile (on VM)
--------
[vagrant@netplugin-node1 netplugin]$ bin/netplugin --version
Version: 1.1.0-rc.1-207-g0e9fdd7-unsupported
GitCommit: 0e9fdd7-unsupported
BuildTime: 10-31-2017.23-41-11.UTC
unclejack commented 6 years ago

build PR

unclejack commented 6 years ago

@chrisplo: Can you remove the version file if it's not needed any more?

chrisplo commented 6 years ago

@unclejack the change is such that the file is no longer ~generated~ needed (it was never checked in, it was generated), for some reason i thought contiv-install read this in but looks like it was only netplugin, will remove

I rebased on master to pick up the objdb fix instead of having it as a commit in this PR

chrisplo commented 6 years ago

build PR

tiewei commented 6 years ago

you might need to shfmt because i can't tell if it's tab or space in the script

chrisplo commented 6 years ago

rechecked tar,release,BUILD_VERSION

chrisplo commented 6 years ago

build PR

chrisplo commented 6 years ago

latest run of release:

Version: 1.0.0-beta
GitCommit: 9dac643-unsupported
BuildTime: 11-02-2017.17-35-33.UTC

creates netplugin-1.0.0-beta.tar.bz2

unclejack commented 6 years ago

build PR