Deb package: added requirements.txt 31/6931/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 20 Nov 2018 16:38:13 +0000 (17:38 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 20 Nov 2018 16:38:17 +0000 (17:38 +0100)
Modified destination folder to deb_dist
Updated .gitignore to add the deb pkg related files and folders

Change-Id: I52b6e0794bf8d7a00315dacad4a4de743d322113
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
.gitignore
build-debpkg.sh
devops-stages/stage-archive.sh

index 6672790..889a1b7 100644 (file)
@@ -51,3 +51,9 @@ instancehandler/migrations
 sdnctrlhandler/migrations
 authosm/migrations
 userhandler/migrations
+
+#Deb package
+deb_dist/
+dists/
+debian/osm-lightui.install
+
index b91cff9..6af77db 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Copyright 2018 Telefonica
 # All Rights Reserved.
 #
@@ -25,9 +25,9 @@ PKG_VERSION=$(git describe --match "v*" --tags --abbrev=0)
 PKG_VERSION_PREFIX=$(echo $PKG_VERSION | sed -e 's/v//g')
 PKG_VERSION_POST=$(git rev-list $PKG_VERSION..HEAD | wc -l)
 if [ "$PKG_VERSION_POST" -eq 0 ]; then
-    PKG_DIR="osm-${MDG_NAME}-${PKG_VERSION_PREFIX}"
+    PKG_DIR="deb_dist/osm-${MDG_NAME}-${PKG_VERSION_PREFIX}"
 else
-    PKG_DIR="osm-${MDG_NAME}-$PKG_VERSION_PREFIX.post${PKG_VERSION_POST}"
+    PKG_DIR="deb_dist/osm-${MDG_NAME}-$PKG_VERSION_PREFIX.post${PKG_VERSION_POST}"
 fi
 
 rm -rf $PKG_DIR
@@ -45,9 +45,11 @@ for f in $PKG_FILES; do
     echo "$f usr/share/osm-$MDG_NAME" >> $DEB_INSTALL
 done
 cp -R debian $PKG_DIR/.
+cp requirements.txt $PKG_DIR
 
-cd $PKG_DIR
+pushd $PKG_DIR
 dh_make -y --indep --createorig --a -c apache
 dpkg-buildpackage -uc -us -tc -rfakeroot
-cd -
+popd
+
 
index 3c47b96..e606ac4 100755 (executable)
@@ -18,7 +18,7 @@ MDG=LW-UI
 rm -rf pool
 rm -rf dists
 mkdir -p pool/$MDG
-mv *.deb pool/$MDG/
+mv deb_dist/*.deb pool/$MDG/
 
 mkdir -p dists/unstable/$MDG/binary-amd64/
 apt-ftparchive packages pool/$MDG > dists/unstable/$MDG/binary-amd64/Packages