Skip to content
Snippets Groups Projects
Commit a9b9b595 authored by alexandr.kravchenko's avatar alexandr.kravchenko
Browse files

Merging export logic with debian.pub.demlabs.net

parent c1b67b86
No related branches found
No related tags found
No related merge requests found
......@@ -48,4 +48,5 @@ done
#[ $(mount | grep "/run/schroot/mount") ] && sudo umount -l /run/schroot/mount && sudo rm -r /run/schroot/mount/* #Removing mountpoint odds.
cd $wd
exit $errcode
#!/bin/bash
make distclean
exit 0
......@@ -21,7 +21,6 @@ substitute_pkgname_postfix() {
#CODENAME=$(lsb_release -a | grep Codename | cut -f2)
#VERSION=$(lsb_release -a | grep Version | cut -f2)
#DISTRO_TYPE=$(lsb_release -a | grep Distributor | cut -f2)
set -x
for variable in $(lsb_release -a 2>/dev/null | sed 's/\t//g' | sed 's/ //g' | sed 's/\:/\=/g'); do
echo "variable is $variable"
export $variable
......@@ -34,7 +33,6 @@ set -x
export -n "Release"
export -n "Codename"
export -n "Description"
set +x
}
......
#!/bin/bash
set -x
repack() {
DEBNAME=$1
......@@ -24,21 +26,26 @@ PKGFILES=($(ls *.deb))
cd ..
mv build/*.deb $wd/$PACKAGE_PATH/ || echo "[ERR] Something went wrong in publishing the package. Now aborting."
#echo "We have $DISTR_CODENAME there"
echo "On path $REPO_DIR_SRC we have debian files."
NOTONBUILDSERVER=0
gitlab-runner -v 2&>> /dev/null || NOTONBUILDSERVER=$?
if [[ $NOTONBUILDSERVER == 0 ]]; then
mkdir -p $REPO_DIR_SRC
cd $REPO_DIR_SRC
for pkgfile in $PKGFILES; do
cd $REPO_DIR_SRC
cp -v $wd/$PACKAGE_PATH/$pkgfile $REPO_DIR_SRC
for variant in $HOST_DISTR_VERSIONS; do
ls $pkgfile | grep $variant && DISTR_CODENAME=$variant #Since we add a postfix into every debpackage done, we'll extract it that way.
done
repack $pkgfile
echo "Attempting to add packages into $DISTR_COMPONENT section to $DISTR_CODENAME"
cd $REPO_DIR
sudo reprepro -C "$DISTR_COMPONENT" --ask-passphrase includedeb "$DISTR_CODENAME" $REPO_DIR_SRC/*.deb
sudo reprepro export "$DISTR_CODENAME"
done
cd $REPO_DIR
echo "Attempting to add packages into $DISTR_VARIANT section to $DISTR_CODENAME"
sudo reprepro -C "$DISTR_COMPONENT" --ask-passphrase includedeb "$DISTR_CODENAME" $REPO_DIR_SRC/*.deb
#Update into reprepro:
#Need to create latest symlink to the project.
......@@ -46,6 +53,8 @@ fi
export -n "UPDVER"
rm -r $REPO_DIR_SRC
cd $wd
set +x
exit 0
#symlink name-actual to the latest version.
#build/deb/versions - for all files
#build/deb/${PROJECT}-latest - for symlinks.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment