-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·43 lines (32 loc) · 1.17 KB
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
set -ex
COMPANY=figure
IMAGE_1=raspberry-pi2
IMAGE_2=raspberry-pi3
# Get version
version=`cat VERSION`
echo "version: $version"
# build images
chmod +x raspberry-pi2/build.sh
./raspberry-pi2/build.sh
chmod +x raspberry-pi3/build.sh
./raspberry-pi3/build.sh
# tag it
git commit --allow-empty -m "Bump to version $version"
git tag -a "$version" -m "version $version"
git push origin
git push origin --tags
docker tag $COMPANY/raspberry-pi2:latest $COMPANY/raspberry-pi2:$version
docker tag $COMPANY/raspberry-pi2:latest $COMPANY/raspberrypi2:latest
docker tag $COMPANY/raspberry-pi2:latest $COMPANY/raspberrypi2:$version
docker tag $COMPANY/raspberry-pi3:latest $COMPANY/raspberry-pi3:$version
docker tag $COMPANY/raspberry-pi3:latest $COMPANY/raspberrypi3:latest
docker tag $COMPANY/raspberry-pi3:latest $COMPANY/raspberrypi3:$version
# push it
docker push $COMPANY/raspberry-pi2:latest
docker push $COMPANY/raspberry-pi2:$version
docker push $COMPANY/raspberry-pi3:latest
docker push $COMPANY/raspberry-pi3:$version
docker push $COMPANY/raspberrypi2:latest
docker push $COMPANY/raspberrypi2:$version
docker push $COMPANY/raspberrypi3:latest
docker push $COMPANY/raspberrypi3:$version