diff --git a/packaging/README.md b/packaging/README.md index b658c70..5203531 100644 --- a/packaging/README.md +++ b/packaging/README.md @@ -36,6 +36,10 @@ inside the synergy-service directory. docker run -i -v /path/to/synergy-service:/tmp/synergy-service \ 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 the guest. @@ -58,6 +62,10 @@ inside the synergy-service directory. docker run -i -v /path/to/synergy-service:/tmp/synergy-service \ 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 diff --git a/packaging/docker/centos7/build.sh b/packaging/docker/centos7/build.sh index 91ac0a9..ba43cf9 100644 --- a/packaging/docker/centos7/build.sh +++ b/packaging/docker/centos7/build.sh @@ -5,8 +5,10 @@ RPMBUILD=/home/pkger/rpmbuild PKG_DIR=/tmp/synergy-service 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() { diff --git a/packaging/docker/ubuntu-14.04/build.sh b/packaging/docker/ubuntu-14.04/build.sh index ab163dc..03983e0 100644 --- a/packaging/docker/ubuntu-14.04/build.sh +++ b/packaging/docker/ubuntu-14.04/build.sh @@ -10,8 +10,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() {