Merge "[packaging] make docker aware of PKG_VERSION"

This commit is contained in:
Jenkins 2016-12-12 10:02:14 +00:00 committed by Gerrit Code Review
commit abb1faef93
3 changed files with 12 additions and 4 deletions

View File

@ -15,3 +15,7 @@
Docker run -i -v /path/to/synergy-scheduler-manager:/tmp/python-synergy-scheduler-manager scheduler-builder-{centos7,ubuntu-14.04}
```
the deb/rpm will be output in `path/to/synergy-scheduler-manager/build`
You can override the package version that will be set during the packaging
process by adding `-e "PKG_VERSION=x.y.z"` to the above command line.
Otherwise, the package version will be set to the latest git tag.

View File

@ -6,8 +6,10 @@ PKG_DIR=/tmp/python-synergy-scheduler-manager
function get_version() {
cd $PKG_DIR
export PKG_VERSION=$(git tag -l "*.*.*" | sort -V | tail -1)
if [[ -z $PKG_VERSION ]]; then
cd $PKG_DIR
export PKG_VERSION=$(git tag -l "*.*.*" | sort -V | tail -1)
fi
}
function setup() {

View File

@ -11,8 +11,10 @@ function copy_source() {
}
function get_version() {
cd $PKG_DIR
export PKG_VERSION=$(git tag -l "*.*.*" | sort -V | tail -1)
if [[ -z $PKG_VERSION ]]; then
cd $PKG_DIR
export PKG_VERSION=$(git tag -l "*.*.*" | sort -V | tail -1)
fi
}
function setup() {