From: garciadeblas Date: Wed, 23 Mar 2022 11:25:27 +0000 (+0100) Subject: Split stage-build and stage-archive conveniently X-Git-Tag: v12.0.0rc1~23 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F79%2F11779%2F2;p=osm%2Fdevops.git Split stage-build and stage-archive conveniently Change-Id: Iae36bf59b76f103f4e7d609f13e1efd8914c310b Signed-off-by: garciadeblas --- diff --git a/devops-stages/stage-archive.sh b/devops-stages/stage-archive.sh index cbbc237c..c16b51bc 100755 --- a/devops-stages/stage-archive.sh +++ b/devops-stages/stage-archive.sh @@ -1,6 +1,7 @@ #!/bin/sh +# # Copyright 2018 Sandvine -# All Rights Reserved. +# Copyright ETSI # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain @@ -14,41 +15,9 @@ # License for the specific language governing permissions and limitations # under the License. -PKG_DIRECTORIES="common jenkins installers systest charms descriptor-packages tools docker robot-systest" MDG_NAME=devops -DEB_INSTALL=debian/osm-$MDG_NAME.install -export DEBEMAIL="mmarchetti@sandvine.com" -export DEBFULLNAME="Michael Marchetti" - -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}" -else - PKG_DIR="osm-${MDG_NAME}-$PKG_VERSION_PREFIX.post${PKG_VERSION_POST}" -fi - -rm -rf $PKG_DIR -rm -f *.orig.tar.xz -rm -f *.deb -rm -f $DEB_INSTALL -mkdir -p $PKG_DIR - -for dir in $PKG_DIRECTORIES; do - ln -s $PWD/$dir $PKG_DIR/. - echo "$dir/* usr/share/osm-$MDG_NAME/$dir" >> $DEB_INSTALL -done -cp LICENSE $PKG_DIR/. -echo "LICENSE usr/share/osm-$MDG_NAME" >> $DEB_INSTALL -cp -R debian $PKG_DIR/. - -cd $PKG_DIR -dh_make -y --indep --createorig --a -c apache -dpkg-buildpackage -uc -us -tc -rfakeroot -cd - - rm -rf pool rm -rf dists mkdir -p pool/$MDG_NAME mv *.deb pool/$MDG_NAME/ + diff --git a/devops-stages/stage-build.sh b/devops-stages/stage-build.sh index 1a248525..ef1151d1 100755 --- a/devops-stages/stage-build.sh +++ b/devops-stages/stage-build.sh @@ -1 +1,50 @@ #!/bin/sh +# +# Copyright ETSI +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +PKG_DIRECTORIES="common jenkins installers systest charms descriptor-packages tools docker robot-systest" +MDG_NAME=devops +DEB_INSTALL=debian/osm-$MDG_NAME.install +export DEBEMAIL="OSM_TECH@LIST.ETSI.ORG" +export DEBFULLNAME="Open Source MANO" + +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}" +else + PKG_DIR="osm-${MDG_NAME}-$PKG_VERSION_PREFIX.post${PKG_VERSION_POST}" +fi + +rm -rf $PKG_DIR +rm -f *.orig.tar.xz +rm -f *.deb +rm -f $DEB_INSTALL +mkdir -p $PKG_DIR + +for dir in $PKG_DIRECTORIES; do + ln -s $PWD/$dir $PKG_DIR/. + echo "$dir/* usr/share/osm-$MDG_NAME/$dir" >> $DEB_INSTALL +done +cp LICENSE $PKG_DIR/. +echo "LICENSE usr/share/osm-$MDG_NAME" >> $DEB_INSTALL +cp -R debian $PKG_DIR/. + +cd $PKG_DIR +dh_make -y --indep --createorig --a -c apache +dpkg-buildpackage -uc -us -tc -rfakeroot +cd - +