-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
version is based on git state or BUILD_VERSION #1042
Conversation
7e7d84f
to
1eafd33
Compare
some testing results:
|
build PR |
@chrisplo: Can you remove the version file if it's not needed any more? |
8aabc61
to
01261b1
Compare
Git version to be calculated by 'git describe --tags --always' and add '-unsupported' when the local workspace has an uncommitted change. the rules are: * BUILD_VERSION will override any calculated version if set as env/make cli variable * if current commit is tagged, use just the tag * else <tag>-<num commits since>-g<commit id> release target will use CURRENT_VERSION to make it simple to set in the release branch Signed-off-by: Chris Plock <chrisplo@cisco.com>
@unclejack the change is such that the file is no longer I rebased on master to pick up the objdb fix instead of having it as a commit in this PR |
build PR |
you might need to |
scripts/build.sh
Outdated
GIT_COMMIT=$(./scripts/getGitCommit.sh) | ||
|
||
echo $BUILD_VERSION >$VERSION_FILE | ||
# TODO(chrisplo): remove when contiv/install no longer needs | ||
echo $BUILD_VERSION > netplugin-version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this new filename for? I don't see it referenced anywhere else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VERSION was $NAME-version, name was netplugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me double check, but I thought contiv/install uses it still
rechecked tar,release,BUILD_VERSION |
build PR |
Makefile
Outdated
release: tar | ||
TAR_FILENAME=$(TAR_FILENAME) TAR_FILE=$(TAR_FILE) \ | ||
OLD_VERSION=${OLD_VERSION} BUILD_VERSION=${BUILD_VERSION} \ | ||
release-built-version: tar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this meant to be release-built-version or does it refer to the built version of netplugin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a helper for release target, the release target sets BUILD_VERSION so that version is externally set instead of through scripts/getGitVersion.sh
Though I see I have BUILD_VERSION duplicated in the release target, should be able to remove one, will update
Makefile
Outdated
NIGHTLY_RELEASE=${NIGHTLY_RELEASE} scripts/release.sh | ||
@make clean-tar | ||
release: export BUILD_VERSION=$(shell cat version/CURRENT_VERSION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems wrong. There are two release targets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a target:
https://www.gnu.org/software/make/manual/html_node/Target_002dspecific.html
latest run of release:
creates netplugin-1.0.0-beta.tar.bz2 |
build PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - please squash on merge
Git version to be calculated by 'git describe --tags --always' and add
'-unsupported' when the local workspace has an uncommitted change.
the rules are:
cli variable
<tag>-<num commits since>-g<commit id>
release target will use CURRENT_VERSION to make it simple to set in the
release branch
Signed-off-by: Chris Plock chrisplo@cisco.com