2020-05-18 16:52:26 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2020-03-26 17:50:12 +01:00
|
|
|
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
|
|
source $current_dir/utils.sh # Get utils functions.
|
|
|
|
|
|
|
|
for debian_version in "stretch" "buster"
|
|
|
|
do
|
2020-05-19 16:45:04 +02:00
|
|
|
|
|
|
|
# There is no stable and testing version for Buster at this time.
|
|
|
|
if [[ "$debian_version" == "buster" ]]
|
|
|
|
then
|
|
|
|
rebuild_base_containers $debian_version "unstable" "amd64"
|
|
|
|
else
|
|
|
|
rebuild_base_containers $debian_version "stable" "amd64"
|
|
|
|
|
|
|
|
for ynh_version in "testing" "unstable"
|
|
|
|
do
|
2020-05-19 17:48:31 +02:00
|
|
|
for snapshot in "before-install" "after-install"
|
|
|
|
do
|
|
|
|
lxc launch "yunohost-$debian_version-stable-$snapshot" "yunohost-$debian_version-$ynh_version-$snapshot-tmp"
|
|
|
|
|
|
|
|
if [[ "$ynh_version" == "testing" ]]
|
|
|
|
then
|
|
|
|
repo_version="testing"
|
|
|
|
elif [[ "$DISTRIB" == "unstable" ]]
|
|
|
|
then
|
|
|
|
repo_version="testing unstable"
|
|
|
|
fi
|
|
|
|
|
|
|
|
lxc exec "yunohost-$debian_version-$ynh_version-$snapshot-tmp" -- /bin/bash -c "for FILE in \`ls /etc/apt/sources.list /etc/apt/sources.list.d/*\`;
|
|
|
|
do
|
|
|
|
sed -i 's@^deb http://forge.yunohost.org.*@& $repo_version@' \$FILE
|
|
|
|
done"
|
2020-05-19 16:45:04 +02:00
|
|
|
|
2020-05-19 17:48:31 +02:00
|
|
|
rotate_image "yunohost-$debian_version-$ynh_version-$snapshot-tmp" "yunohost-$debian_version-$ynh_version-$snapshot"
|
2020-05-19 16:45:04 +02:00
|
|
|
|
2020-05-19 17:48:31 +02:00
|
|
|
lxc delete -f "yunohost-$debian_version-$ynh_version-$snapshot-tmp"
|
2020-05-19 16:45:04 +02:00
|
|
|
|
2020-05-19 20:57:20 +02:00
|
|
|
update_image $debian_version $ynh_version $snapshot
|
2020-05-19 17:48:31 +02:00
|
|
|
done
|
2020-05-19 16:45:04 +02:00
|
|
|
done
|
|
|
|
fi
|
2020-03-26 17:50:12 +01:00
|
|
|
done
|