aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build-package.sh (renamed from scripts/build_package.sh)17
-rw-r--r--scripts/version6
2 files changed, 15 insertions, 8 deletions
diff --git a/scripts/build_package.sh b/scripts/build-package.sh
index 8189efdc..264b6ab6 100644
--- a/scripts/build_package.sh
+++ b/scripts/build-package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+k#!/bin/bash
set -euxo pipefail
IFS=$'\n\t'
@@ -7,7 +7,8 @@ APT_PATH=`which apt-get` || true
apt_get=${APT_PATH:-"/usr/local/bin/apt-get"}
BUILD_TOOLS_UBUNTU="build-essential doxygen"
-DEPS_UBUNTU="devscripts debhelper python3-all python3-setuptools python3-docutils python3-sphinx python3-networkx python3-openssl python3-pyparsing python3-pip"
+DEPS_UBUNTU="devscripts debhelper python3-all python3-setuptools python3-docutils python3-sphinx python3-networkx python3-pyparsing python3-pip"
+DEPS_PYTHON="autobahn pyopenssl"
setup() {
@@ -47,6 +48,7 @@ build_package() {
# Install package dependencies
if [ $DISTRIB_ID == "Ubuntu" ]; then
echo $BUILD_TOOLS_UBUNTU $DEPS_UBUNTU | xargs sudo ${apt_get} install -y --allow-unauthenticated
+ echo $DEPS_PYTHON | xargs sudo pip3 install --upgrade
fi
# do nothing but print the current slave hostname
@@ -63,9 +65,15 @@ vicn ($VERSION) UNRELEASED; urgency=medium
-- Mauro Sardara <mauro.sardara@cisco.com> Tue, 18 Oct 2016 12:10:07 +0200
EOF
- pushd $SCRIPT_PATH/..
+ mkdir -p $SCRIPT_PATH/../vicn_build_root
+ ls -1 | while read line; do if [ "$line" != "$(basename $SCRIPT_PATH)" ]; then mv $line $SCRIPT_PATH/../vicn_build_root; fi done || true
+ cd $SCRIPT_PATH/../vicn_build_root
+
debuild --no-lintian --no-tgz-check -i -us -uc -b
- popd
+
+ cd $SCRIPT_PATH/..
+ mkdir build
+ mv *.deb build
echo "*******************************************************************"
echo "* $PACKAGE_NAME BUILD SUCCESSFULLY COMPLETED"
@@ -78,4 +86,3 @@ PACKAGE_NAME="VICN"
pushd $SCRIPT_PATH/..
build_package $PACKAGE_NAME
popd
-
diff --git a/scripts/version b/scripts/version
index dcf93d83..2f4c1d4a 100644
--- a/scripts/version
+++ b/scripts/version
@@ -7,7 +7,7 @@ cd "$path"
git rev-parse 2> /dev/null
if [ $? == 0 ]; then
- vstring=$(git describe --dirty --match "$version_prefix*" | sed "s/$version_prefix//")
+ vstring=$(git describe --match "$version_prefix*" | sed "s/$version_prefix//")
elif [ -f .version ]; then
vstring=$(cat .version)
else
@@ -23,7 +23,7 @@ ADD=$(echo ${vstring} | cut -s -d- -f2)
git rev-parse 2> /dev/null
if [ $? == 0 ]; then
- CMT=$(git describe --dirty --match "$version_prefix*" | sed "s/$version_prefix//" | cut -s -d- -f3,4)
+ CMT=$(git describe --match "$version_prefix*" | sed "s/$version_prefix//" | cut -s -d- -f3,4)
else
CMT=$(echo ${vstring} | cut -s -d- -f3,4)
fi
@@ -54,4 +54,4 @@ fi
fi
else
echo ${TAG}-release
-fi \ No newline at end of file
+fi