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

uncommented post-build script

parent 24c77d5d
No related branches found
No related tags found
2 merge requests!71Support 2649,!70Support 2649
......@@ -38,7 +38,7 @@ for platform in $PLATFORMS; do
fi
done
done
# [ -e prod_build/$platform/scripts/post-build.sh ] && prod_build/$platform/scripts/post-build.sh #For post-build actions not in chroot (global publish)
[ -e prod_build/$platform/scripts/post-build.sh ] && prod_build/$platform/scripts/post-build.sh #For post-build actions not in chroot (global publish)
PKG_FORMAT=$(echo $PKG_FORMAT | cut -d ' ' -f2-)
# export_variables clean
done
......
#!/bin/bash
export_variables() {
IFS=$'\n'
for variable in $(cat prod_build/$platform/conf/*); do
[ -z $1 ] && export $(echo "$variable" | sed 's/\"//g') || export -n $(echo $variable | cut -d '=' -f1)
done
}
CHROOT_PREFIX="builder"
CHROOTS_PATH=$1
PLATFORMS=$2
PKG_FORMAT=$3
SRC_PATH=$4
JOB=$5
cd $SRC_PATH
for platform in $PLATFORMS; do
export_variables
IFS=' '
PKG_TYPE=$(echo $PKG_FORMAT | cut -d ' ' -f1)
#Check if chroots are present
echo $HOST_DISTR_VERSIONS
echo $HOST_ARCH_VERSIONS
[ -e prod_build/$platform/scripts/pre-build.sh ] && prod_build/$platform/scripts/pre-build.sh #For actions not in chroot (like version update)
for distr in $HOST_DISTR_VERSIONS; do
for arch in $HOST_ARCH_VERSIONS; do
if [ -e $CHROOTS_PATH/$CHROOT_PREFIX-$distr-$arch ]; then
schroot -c $CHROOT_PREFIX-$distr-$arch -- launcher.sh prod_build/$platform/scripts/$JOB.sh $PKG_TYPE || errcode=$?
else
echo "chroot $CHROOT_PREFIX-$distr-$arch not found. You should install it first"
fi
done
done
[ -e prod_build/$platform/scripts/post-build.sh ] && prod_build/$platform/scripts/post-build.sh #For post-build actions not in chroot (like global publish)
PKG_FORMAT=$(echo $PKG_FORMAT | cut -d ' ' -f2-)
export_variables clean
done
[ $(mount | grep "/run/schroot/mount") ] && sudo umount -l /run/schroot/mount && sudo rm -r /run/schroot/mount/* #Removing mountpoint odds.
cd $wd
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