forked from overkill32/hassio-remote-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·31 lines (30 loc) · 1.07 KB
/
build.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
set -ev
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
if [ -z ${TRAVIS_TAG} ]; then
echo "Untagged build found. Building to test."
docker run -it --rm --privileged --name "${ADDON_NAME}" \
-v ~/.docker:/root/.docker \
-v "$(pwd)":/docker \
hassioaddons/build-env:latest \
--target "${ADDON_NAME}" \
--git \
--all \
--from "homeassistant/{arch}-base" \
--author "Nicolai Bjerre Pedersen <[email protected]>" \
--doc-url "${GITHUB_URL}" \
--image "fixated/${ADDON_NAME}-{arch}"
else
echo "New git tagged build found. Building to distribute."
docker run -it --rm --privileged --name "${ADDON_NAME}" \
-v ~/.docker:/root/.docker \
-v "$(pwd)":/docker \
hassioaddons/build-env:latest \
--target "${ADDON_NAME}" \
--git \
--all \
--push \
--from "homeassistant/{arch}-base" \
--author "Nicolai Bjerre Pedersen <[email protected]>" \
--doc-url "${GITHUB_URL}" \
--image "fixated/${ADDON_NAME}-{arch}"
fi