Skip to content

Commit

Permalink
build-docker.sh: Some small improvements for parameter handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mwild1 committed Mar 11, 2016
1 parent c095ddd commit b98fdd4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build-docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# /bin/bash
#!/bin/bash

if [[ -z "$1" ]]; then
echo "Usage: ./build-docker.sh def_file_name version_number"
Expand All @@ -11,18 +11,18 @@ if [[ -z "$2" ]]; then
fi

echo "Starting build..."
cp $1 ./prosody.deb
docker build -t prosody/prosody:$2 .
cp "$1" ./prosody.deb
docker build -t prosody/prosody:"$2" .
for i in "${@:3}"; do
echo "Also building tag $i"
docker build -t prosody/prosody:$i .
docker build -t prosody/prosody:"$i" .
done
docker push prosody/prosody

echo "Cleaning up..."
docker rmi prosody/prosody:$2
docker rmi prosody/prosody:"$2"
for i in "${@:3}"; do
echo "Also cleaning tag $i"
docker rmi prosody/prosody:$i
docker rmi prosody/prosody:"$i"
done
rm ./prosody.deb

0 comments on commit b98fdd4

Please sign in to comment.