#!/bin/bash -ex ############################################################### # Uses LXD to create an Ubuntu focal container and produce # # a reasonably portable AppImage of URDE. # ############################################################### VERSION=${VERSION:-local} CONTAINER_NAME=urde-ci # Set up container, deleting existing if necessary if lxc info $CONTAINER_NAME >& /dev/null then lxc delete $CONTAINER_NAME --force fi lxc init ubuntu:20.04 $CONTAINER_NAME # Inject build script lxc file push - $CONTAINER_NAME/root/dobuild.sh </dev/null; do echo 'Waiting for network...'; sleep 1; done" # Run build script lxc exec $CONTAINER_NAME -t -- bash /root/dobuild.sh # Retrieve AppImage lxc file pull $CONTAINER_NAME/URDE-$VERSION-$(uname -m).AppImage . # Cleanup lxc delete $CONTAINER_NAME --force