From 8ecb38ccfe7fb5de2b306958088d1a6ea51d3d66 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 4 Jun 2020 19:35:28 +0000 Subject: [PATCH] Update messages with emojoz, remove unecessary sudos --- daily-build | 5 +---- scripts/build_deb | 8 ++++---- scripts/rebuildd/build-binaries | 4 ++-- scripts/rebuildd/get-sources | 2 +- scripts/rebuildd/upload-binaries | 4 ++-- scripts/repo/include-changes | 6 +++--- scripts/repo/process-include | 2 +- scripts/ynh-custom-builds | 4 +++- 8 files changed, 17 insertions(+), 18 deletions(-) diff --git a/daily-build b/daily-build index 9362432..ef99746 100755 --- a/daily-build +++ b/daily-build @@ -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 diff --git a/scripts/build_deb b/scripts/build_deb index 4273e8f..284f06d 100755 --- a/scripts/build_deb +++ b/scripts/build_deb @@ -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 diff --git a/scripts/rebuildd/build-binaries b/scripts/rebuildd/build-binaries index a6c396e..9820ac2 100755 --- a/scripts/rebuildd/build-binaries +++ b/scripts/rebuildd/build-binaries @@ -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 diff --git a/scripts/rebuildd/get-sources b/scripts/rebuildd/get-sources index 1109ec4..b9140fd 100755 --- a/scripts/rebuildd/get-sources +++ b/scripts/rebuildd/get-sources @@ -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} diff --git a/scripts/rebuildd/upload-binaries b/scripts/rebuildd/upload-binaries index 3beef85..f82bfa6 100755 --- a/scripts/rebuildd/upload-binaries +++ b/scripts/rebuildd/upload-binaries @@ -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 diff --git a/scripts/repo/include-changes b/scripts/repo/include-changes index beeaade..a2c32f0 100755 --- a/scripts/repo/include-changes +++ b/scripts/repo/include-changes @@ -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 diff --git a/scripts/repo/process-include b/scripts/repo/process-include index ce7397b..ae92ad4 100755 --- a/scripts/repo/process-include +++ b/scripts/repo/process-include @@ -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 diff --git a/scripts/ynh-custom-builds b/scripts/ynh-custom-builds index d921ddc..4d688c4 100755 --- a/scripts/ynh-custom-builds +++ b/scripts/ynh-custom-builds @@ -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)