mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-15 09:19:48 +00:00
26 lines
492 B
Bash
26 lines
492 B
Bash
|
#!/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
|