mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-27 09:12:31 +00:00
26 lines
492 B
Bash
Executable File
26 lines
492 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -o errexit
|
|
set -o pipefail
|
|
|
|
date=$(date +'%Y%m%d' -u)
|
|
REPO='resin/amd64-supervisor-base'
|
|
|
|
git submodule update --init --recursive
|
|
rm -rf dest
|
|
mkdir dest
|
|
|
|
docker build -t supervisor-base-builder .
|
|
docker run --rm \
|
|
-v `pwd`:/source \
|
|
-v `pwd`/dest:/dest \
|
|
supervisor-base-builder
|
|
if [ -f dest/rootfs.tar.bz2 ]; then
|
|
cat dest/rootfs.tar.bz2 | docker import - $REPO:$date
|
|
docker tag -f $REPO:$date $REPO:latest
|
|
docker push $REPO
|
|
else
|
|
echo "rootfs is missing!"
|
|
exit 1
|
|
fi
|