mirror of
https://github.com/YunoHost/vinaigrette.git
synced 2024-09-03 20:06:11 +02:00
Update messages with emojoz, remove unecessary sudos
This commit is contained in:
parent
03ae738367
commit
8ecb38ccfe
8 changed files with 17 additions and 18 deletions
|
@ -5,10 +5,7 @@ readonly BRANCH_NIGHTLY="unstable"
|
||||||
readonly DISTRIBS="stretch buster"
|
readonly DISTRIBS="stretch buster"
|
||||||
readonly TIMETAG="$(date +%Y%m%d%H%M)"
|
readonly TIMETAG="$(date +%Y%m%d%H%M)"
|
||||||
readonly PACKAGES="moulinette SSOwat yunohost yunohost-admin"
|
readonly PACKAGES="moulinette SSOwat yunohost yunohost-admin"
|
||||||
if [ -z "$FORCE" ]
|
readonly FORCE="false"
|
||||||
then
|
|
||||||
readonly FORCE="false"
|
|
||||||
fi
|
|
||||||
readonly LAST_BUILDS_CACHE="/var/cache/vinaigrette/last_builds/"
|
readonly LAST_BUILDS_CACHE="/var/cache/vinaigrette/last_builds/"
|
||||||
|
|
||||||
source /home/vinaigrette/config/config
|
source /home/vinaigrette/config/config
|
||||||
|
|
|
@ -41,7 +41,7 @@ function main()
|
||||||
add_to_reprepro
|
add_to_reprepro
|
||||||
|
|
||||||
success "Build will start soon. See 'rebuildd-job list | tail'"
|
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} ..."
|
boxed "Building source package of ${PACKAGE} ${VERSION} ..."
|
||||||
|
|
||||||
pbuilder execute --bindmounts ${ROOT_DIR} --basetgz ${IMG} -- ${BUILD_SOURCES} $PKG_DIR \
|
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()
|
function add_to_reprepro()
|
||||||
{
|
{
|
||||||
boxed "Adding ${PACKAGE}_${VERSION} to ${DISTRIB}/${BRANCH}..."
|
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
|
[[ "$1" =~ ^-h|--help$ ]] && (usage; exit 0) || main
|
||||||
|
|
|
@ -5,7 +5,7 @@ package=$2
|
||||||
version=$3
|
version=$3
|
||||||
arch=$4
|
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/config/config
|
||||||
source /home/vinaigrette/scripts/package_helpers.sh
|
source /home/vinaigrette/scripts/package_helpers.sh
|
||||||
|
@ -38,6 +38,6 @@ pbuilder build \
|
||||||
|
|
||||||
exit_code=$?
|
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
|
exit $exit_code
|
||||||
|
|
|
@ -4,6 +4,6 @@ codename=$1
|
||||||
package=$2
|
package=$2
|
||||||
version=$3
|
version=$3
|
||||||
|
|
||||||
sudo apt-get update > /dev/null 1>&1
|
apt-get update > /dev/null 1>&1
|
||||||
apt-get -q --download-only --only-source \
|
apt-get -q --download-only --only-source \
|
||||||
source ${package}=${version}
|
source ${package}=${version}
|
||||||
|
|
|
@ -46,9 +46,9 @@ if [ $status -eq 0 ]; then
|
||||||
for f in $(get_files $CHANGES_FILE); do
|
for f in $(get_files $CHANGES_FILE); do
|
||||||
rm -f /var/cache/pbuilder/result/$f
|
rm -f /var/cache/pbuilder/result/$f
|
||||||
done
|
done
|
||||||
sendxmpppy "Completed build of ${package}/${version} for ${CODENAME}/${COMPONENT}/${arch}."
|
sendxmpppy "✔️ Completed build for ${package}/${version} for ${CODENAME}/${COMPONENT}/${arch}."
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
exit $status
|
exit $status
|
||||||
|
|
|
@ -15,16 +15,16 @@ then
|
||||||
echo $(grep "Binary:" $DSC) >> $changes_file
|
echo $(grep "Binary:" $DSC) >> $changes_file
|
||||||
fi
|
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=$?
|
RET=$?
|
||||||
|
|
||||||
# Cleaning files
|
# Cleaning files
|
||||||
if [ $RET -eq 0 ]; then
|
if [ $RET -eq 0 ]; then
|
||||||
dir=$(cd `dirname $changes_file` && pwd)
|
dir=$(cd `dirname $changes_file` && pwd)
|
||||||
for f in $(get_files ${changes_file}); do
|
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
|
done
|
||||||
sudo rm -f $changes_file
|
rm -f $changes_file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit $RET
|
exit $RET
|
||||||
|
|
|
@ -38,7 +38,7 @@ fi
|
||||||
|
|
||||||
# Kick off the job
|
# Kick off the job
|
||||||
for a in $arch; do
|
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
|
done
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
readonly THISSCRIPT=$0
|
readonly THISSCRIPT=$0
|
||||||
readonly PACKAGE=$1
|
readonly PACKAGE=$1
|
||||||
readonly BRANCH=$2
|
readonly BRANCH=$2
|
||||||
|
#readonly DISTRIB="buster"
|
||||||
readonly DISTRIB="stretch"
|
readonly DISTRIB="stretch"
|
||||||
|
readonly DISTRIB_N="9"
|
||||||
|
|
||||||
source /home/vinaigrette/config/config
|
source /home/vinaigrette/config/config
|
||||||
source /home/vinaigrette/scripts/common.sh
|
source /home/vinaigrette/scripts/common.sh
|
||||||
|
@ -60,7 +62,7 @@ function tweak_miniupnpc()
|
||||||
function tweak_metronome()
|
function tweak_metronome()
|
||||||
{
|
{
|
||||||
# For some reason metronome version must include a revision ("-x")
|
# 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)
|
# (These are the old stuff for which we had custom builds in stretch)
|
||||||
|
|
Loading…
Add table
Reference in a new issue