Update messages with emojoz, remove unecessary sudos

This commit is contained in:
Alexandre Aubin 2020-06-04 19:35:28 +00:00
parent 03ae738367
commit 8ecb38ccfe
8 changed files with 17 additions and 18 deletions

View file

@ -5,10 +5,7 @@ readonly BRANCH_NIGHTLY="unstable"
readonly DISTRIBS="stretch buster"
readonly TIMETAG="$(date +%Y%m%d%H%M)"
readonly PACKAGES="moulinette SSOwat yunohost yunohost-admin"
if [ -z "$FORCE" ]
then
readonly FORCE="false"
fi
readonly FORCE="false"
readonly LAST_BUILDS_CACHE="/var/cache/vinaigrette/last_builds/"
source /home/vinaigrette/config/config

View file

@ -41,7 +41,7 @@ function main()
add_to_reprepro
success "Build will start soon. See 'rebuildd-job list | tail'"
sendxmpppy "Added builds for ${PACKAGE}/${VERSION} for ${DISTRIB}/${BRANCH} ..."
sendxmpppy " Added build for ${PACKAGE}/${VERSION} for ${DISTRIB}/${BRANCH} ..."
}
# ################# #
@ -75,16 +75,16 @@ function build_sources()
boxed "Building source package of ${PACKAGE} ${VERSION} ..."
pbuilder execute --bindmounts ${ROOT_DIR} --basetgz ${IMG} -- ${BUILD_SOURCES} $PKG_DIR \
|| { sendxmpppy "An error occured while building source package for $PACKAGE"; critical "An error occured while building source package"; }
|| { sendxmpppy "❌ Failed to build source package for $PACKAGE"; critical "An error occured while building source package"; }
[[ -f ${CHANGES_FILE} ]] || { sendxmpppy "An error occured while building source package for $PACKAGE"; critical "An error occured while building source package (no change file available)"; }
[[ -f ${CHANGES_FILE} ]] || { sendxmpppy "❌ Failed to build source package for $PACKAGE"; critical "An error occured while building source package (no change file available)"; }
}
function add_to_reprepro()
{
boxed "Adding ${PACKAGE}_${VERSION} to ${DISTRIB}/${BRANCH}..."
$INCLUDE_CHANGES $DISTRIB $BRANCH $CHANGES_FILE || { sendxmpppy "An error occured while including source package $PACKAGE"; critical "An error occured while including source package"; }
$INCLUDE_CHANGES $DISTRIB $BRANCH $CHANGES_FILE || { sendxmpppy "❌ Failed to include changes for source package $PACKAGE"; critical "An error occured while including source package"; }
}
[[ "$1" =~ ^-h|--help$ ]] && (usage; exit 0) || main

View file

@ -5,7 +5,7 @@ package=$2
version=$3
arch=$4
sendxmpppy "Starting build ${package}/${version} for arch=$arch ..."
sendxmpppy "Starting build for ${package}/${version} for arch=$arch ..."
source /home/vinaigrette/config/config
source /home/vinaigrette/scripts/package_helpers.sh
@ -38,6 +38,6 @@ pbuilder build \
exit_code=$?
[[ $exit_code == 0 ]] || sendxmpppy "Building ${package}/${version} for arch=$arch failed ?!"
[[ $exit_code == 0 ]] || sendxmpppy "❌ Failed build for ${package}/${version} for arch=$arch ?!"
exit $exit_code

View file

@ -4,6 +4,6 @@ codename=$1
package=$2
version=$3
sudo apt-get update > /dev/null 1>&1
apt-get update > /dev/null 1>&1
apt-get -q --download-only --only-source \
source ${package}=${version}

View file

@ -46,9 +46,9 @@ if [ $status -eq 0 ]; then
for f in $(get_files $CHANGES_FILE); do
rm -f /var/cache/pbuilder/result/$f
done
sendxmpppy "Completed build of ${package}/${version} for ${CODENAME}/${COMPONENT}/${arch}."
sendxmpppy "✔️ Completed build for ${package}/${version} for ${CODENAME}/${COMPONENT}/${arch}."
else
sendxmpppy "Failed to include change of ${package}/${version} for ${CODENAME}/${COMPONENT}/${arch} ?!"
sendxmpppy "Failed to include change of ${package}/${version} for ${CODENAME}/${COMPONENT}/${arch} ?!"
fi
exit $status

View file

@ -15,16 +15,16 @@ then
echo $(grep "Binary:" $DSC) >> $changes_file
fi
sudo reprepro -C $distribution -V -b $REPO_DIR include $codename $changes_file
reprepro -C $distribution -V -b $REPO_DIR include $codename $changes_file
RET=$?
# Cleaning files
if [ $RET -eq 0 ]; then
dir=$(cd `dirname $changes_file` && pwd)
for f in $(get_files ${changes_file}); do
! [[ $f =~ \.orig\.tar\.(gz|xz)$ ]] && sudo rm -f ${dir}/$f
! [[ $f =~ \.orig\.tar\.(gz|xz)$ ]] && rm -f ${dir}/$f
done
sudo rm -f $changes_file
rm -f $changes_file
fi
exit $RET

View file

@ -38,7 +38,7 @@ fi
# Kick off the job
for a in $arch; do
sudo /home/vinaigrette/scripts/rebuildd-job add $package $version $codename $a
/home/vinaigrette/scripts/rebuildd-job add $package $version $codename $a
done
exit 0

View file

@ -3,7 +3,9 @@
readonly THISSCRIPT=$0
readonly PACKAGE=$1
readonly BRANCH=$2
#readonly DISTRIB="buster"
readonly DISTRIB="stretch"
readonly DISTRIB_N="9"
source /home/vinaigrette/config/config
source /home/vinaigrette/scripts/common.sh
@ -60,7 +62,7 @@ function tweak_miniupnpc()
function tweak_metronome()
{
# For some reason metronome version must include a revision ("-x")
readonly VERSION="$(dpkg-parsechangelog -S Version 2>/dev/null)+yunohost-1"
readonly VERSION="$(dpkg-parsechangelog -S Version 2>/dev/null)+ynh$DISTRIB_N-1"
}
# (These are the old stuff for which we had custom builds in stretch)