Skip to content
Snippets Groups Projects
Commit ee31c646 authored by alexandr.kravchenko's avatar alexandr.kravchenko Committed by dmitriy.gerasimov
Browse files

Support 2649

parent 90f4b08c
No related branches found
No related tags found
No related merge requests found
Showing
with 112 additions and 0 deletions
debian 0 → 120000
prod_build/linux/debian/essentials
\ No newline at end of file
ANDROID_NDK_HOME="/opt/android-ndk-r16b"
SDKROOT="/opt/android-sdk/bin"
NDKHOST="linux-x86_64"
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
ANDRQT_HOME="/usr/lib/crossdev"
HOST_DISTR_VERSIONS="stretch"
HOST_ARCH_VERSIONS="amd64"
RES_PATH=SapNetGui/resources/UltraPad/platforms/android
WORK_PATH=../sapnet-client-build
BRAND=UltraPad
ARCH_VERSIONS="arm64-v8a armv7 x86 x86_64 arm"
PACKAGE_PATH=builds/apk/
VERSION_FILE=config.pri
VERSION_ENTRIES="VER_MAJ VER_MIN VER_PAT VER_CODE"
VERSION_FORMAT="VER_MAJ.VER_MIN-VER_PAT"
#!/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
echo "Platforms are $PLATFORMS"
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 $CHROOT_PREFIX #For actions not in chroot (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=$?
# echo "schroot stub $PKG_TYPE"
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 (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
VERSION_FILE=CMakeLists.txt
VERSION_ENTRIES="CPACK_PACKAGE_VERSION_MAJOR CPACK_PACKAGE_VERSION_MINOR CPACK_PACKAGE_VERSION_PATCH"
VERSION_FORMAT="CPACK_PACKAGE_VERSION_MAJOR.CPACK_PACKAGE_VERSION_MINOR-CPACK_PACKAGE_VERSION_PATCH"
#!/bin/bash
extract_version_number() {
IFS=" "
local VERSION_STRING=$VERSION_FORMAT
for entry in $VERSION_ENTRIES; do
VERSION_STRING=$(echo $VERSION_STRING | sed "s/$entry/$( cat $VERSION_FILE | grep $entry | grep [0-9] | cut -d ' ' -f3 | cut -d ')' -f1 )/") #Replacing templates with numbers
done
echo -e "$VERSION_STRING"
}
extract_gitlog_text() {
borders=$( git log | grep -n 'commit\|Date' | head -n 3 | tail -n 2 | cut -d ':' -f1)
upb=$(echo $borders | cut -d $'\n' -f1)
dwnb=$(echo $borders | cut -d $'\n' -f2)
text=$(git log | head -n $( expr $dwnb - 2 ) | tail -n $( expr $dwnb - $upb - 3 ) )
echo $text
}
export_variables() {
IFS=$'\n'
for variable in $(cat $1); do
echo "$variable"
export $(echo "$variable" | sed 's/\"//g')
done
}
unexport_variables() {
IFS=$'\n'
for variable in $(cat $1); do
echo "$variable"
export -n $(echo $variable | cut -d '=' -f1)
done
}
PKG_DEPS="libjson-c-dev libsqlite3-dev libmemcached-dev libev-dev libmagic-dev libcurl4-gnutls-dev libldb-dev libtalloc-dev libtevent-dev"
HOST_DISTR_VERSIONS="stretch buster"
HOST_ARCH_VERSIONS="amd64"
PACKAGE_PATH=builds/deb/
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