[packaging] make docker aware of PKG_VERSION
When packaging, we can now pass a PKG_VERSION environment variable to docker to force which version is being packaged. If this variable is not passed to docker, then the version is the latest git tag. Change-Id: I8863d6a101e8d85573d8547bab1a667060648018
This commit is contained in:
parent
d82f0e3135
commit
a1657004eb
@ -36,6 +36,10 @@ inside the synergy-service directory.
|
|||||||
docker run -i -v /path/to/synergy-service:/tmp/synergy-service \
|
docker run -i -v /path/to/synergy-service:/tmp/synergy-service \
|
||||||
synergy-centos7-builder
|
synergy-centos7-builder
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
This actually mount the synergy-service directory to `/tmp/synergy-service` on
|
This actually mount the synergy-service directory to `/tmp/synergy-service` on
|
||||||
the guest.
|
the guest.
|
||||||
|
|
||||||
@ -58,6 +62,10 @@ inside the synergy-service directory.
|
|||||||
docker run -i -v /path/to/synergy-service:/tmp/synergy-service \
|
docker run -i -v /path/to/synergy-service:/tmp/synergy-service \
|
||||||
synergy-ubuntu14.04-builder
|
synergy-ubuntu14.04-builder
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
- the resulting deb should be in the build directory if successful
|
- the resulting deb should be in the build directory if successful
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,8 +5,10 @@ RPMBUILD=/home/pkger/rpmbuild
|
|||||||
PKG_DIR=/tmp/synergy-service
|
PKG_DIR=/tmp/synergy-service
|
||||||
|
|
||||||
function get_version() {
|
function get_version() {
|
||||||
|
if [[ -z $PKG_VERSION ]]; then
|
||||||
cd $PKG_DIR
|
cd $PKG_DIR
|
||||||
export PKG_VERSION=$(git tag -l "*.*.*" | sort -V | tail -1)
|
export PKG_VERSION=$(git tag -l "*.*.*" | sort -V | tail -1)
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup() {
|
function setup() {
|
||||||
|
@ -10,8 +10,10 @@ function copy_source() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_version() {
|
function get_version() {
|
||||||
|
if [[ -z $PKG_VERSION ]]; then
|
||||||
cd $PKG_DIR
|
cd $PKG_DIR
|
||||||
export PKG_VERSION=$(git tag -l "*.*.*" | sort -V | tail -1)
|
export PKG_VERSION=$(git tag -l "*.*.*" | sort -V | tail -1)
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup() {
|
function setup() {
|
||||||
|
Loading…
Reference in New Issue
Block a user