Skip to content

Commit

Permalink
Unify helper
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxWinterstein committed Feb 26, 2021
1 parent a25d47f commit 5ffd106
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 35 deletions.
1 change: 1 addition & 0 deletions eufy-ha-mqtt-bridge/helper-builder.sh
32 changes: 19 additions & 13 deletions ioBroker/helper-build-and-push.sh → helper-builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,34 @@

# see https://github.com/home-assistant/builder

# thx https://stackoverflow.com/a/51911626
__usage="
Usage: $(basename $0) [OPTIONS]
Options:
push Build all possible and push
test <arch> Build for <arch>
Example:
$(basename $0) test amd64
"

if [[ $1 = "push" ]]; then
echo 'build and push...'
sleep 5
echo -n Dockerhub password for maxwinterstein:
echo 'Build all and push...'
echo -n "Dockerhub password for maxwinterstein: "
read -s password
echo
docker run --privileged \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v $PWD/:/data homeassistant/amd64-builder \
--all -t /data --docker-user maxwinterstein --docker-password $password #--docker-hub-check
elif [[ $1 = "test" ]]; then
echo 'Just testing all...'
arch=${2:-all}
echo "Build for $arch..."
sleep 5
docker run --privileged -v ~/.docker:/root/.docker \
docker run --privileged \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v $PWD/:/data homeassistant/amd64-builder \
--all --test -t /data
--$arch --test -t /data
else
echo 'Just testing all...'
sleep 5
docker run --privileged -v ~/.docker:/root/.docker \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v $PWD/:/data homeassistant/amd64-builder \
--amd64 --test -t /data
echo "$__usage"
fi
1 change: 1 addition & 0 deletions ioBroker/helper-builder.sh
22 changes: 0 additions & 22 deletions toogoodtogo-ha-mqtt-bridge/helper-build-and-push.sh

This file was deleted.

1 change: 1 addition & 0 deletions toogoodtogo-ha-mqtt-bridge/helper-builder.sh

0 comments on commit 5ffd106

Please sign in to comment.