forked from asyrique/picake
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·17 lines (15 loc) · 811 Bytes
/
deploy.sh
File metadata and controls
executable file
·17 lines (15 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
# Zip up image and copy to mounted dir
# Bash strict mode
set -euv
IFS=$'\n\t'
echo -e "\e[1;32mImage build completed!\e[0m"
echo -e "\e[1;32mBeginning zipping of image file to release directory...\e[0m"
pigz -f --best < /srv/builddir/img/rpi2-musedboxbase.img > $HOSTDIR/rpi2-musedboxbase-${DRONE_COMMIT:0:7}.img.gz
echo -e "\e[1;32mCopying unzipped image file to release directory for further steps...\e[0m"
cp -rf /srv/builddir/img/rpi2-musedboxbase.img $HOSTDIR/rpi2-musedboxbase-latest.img
rm -f /srv/builddir/img/rpi2-musedboxbase.img
echo -e "\e[1;32mImage ${DRONE_COMMIT:0:7} deployed to release directory. Linking latest link....\e[0m"
ln -f -s ./rpi2-musedboxbase-${DRONE_COMMIT:0:7}.img.gz $HOSTDIR/rpi2-musedboxbase-latest.img.gz
echo -e "\e[1;32mBuild process completed.\e[0m"
exit 0