diff options
author | Tim Emiola <temiola@google.com> | 2015-04-03 15:10:52 -0700 |
---|---|---|
committer | Tim Emiola <temiola@google.com> | 2015-04-03 15:10:52 -0700 |
commit | 2a113f6edcc0948c521f2f3e351d138b66316026 (patch) | |
tree | abf3a1e4ad2482d23f851452d0d55373f7ec3254 | |
parent | 8be9887f0b7dddc55187a614f517e4558b33c94a (diff) |
Add the version of the built deb to be configured by a file
-rwxr-xr-x | tools/distpackages/build_deb_packages.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/distpackages/build_deb_packages.sh b/tools/distpackages/build_deb_packages.sh index 7b2acb6577..3976529ab5 100755 --- a/tools/distpackages/build_deb_packages.sh +++ b/tools/distpackages/build_deb_packages.sh @@ -30,11 +30,18 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Where to put resulting .deb packages. -deb_dest="deb_out" +deb_dest="/tmp/deb_out" mkdir -p $deb_dest -version='0.5.0.0' +# Update version from default values if the file /version.txt exists +# +# - when present, /version.txt will by the docker build pkg_version='0.5.0' +if [ -f /version.txt ]; then + pkg_version=$(cat /version.txt) +fi +version="${pkg_version}.0" +echo "Target release => $pkg_version" if [ -f /.dockerinit ]; then # We're in Docker where uname -p returns "unknown". @@ -110,8 +117,5 @@ do dpkg-deb -c $deb_path echo "Problems reported by lintian:" lintian $deb_path - echo done - - |