@ -9,18 +9,28 @@ build:
.PHONY : clean
.PHONY : clean
clean :
clean :
if [ -f docker-machine-driver-xenserver ] ; then rm docker-machine-driver-xenserver ; fi
rm -f docker-machine-driver-xenserver \
for arch in 386 amd64 ; do \
docker-machine-driver-xenserver_darwin-386.tar.gz \
for os in darwin linux ; do \
docker-machine-driver-xenserver_darwin-amd64.tar.gz \
if [ -f docker-machine-driver-xenserver_$$ os-$$ arch ] ; then rm docker-machine-driver-xenserver_$$ os-$$ arch ; fi ; \
docker-machine-driver-xenserver_linux-386.tar.gz \
done \
docker-machine-driver-xenserver_linux-amd64.tar.gz \
done
docker-machine-driver-xenserver_windows-386.zip \
docker-machine-driver-xenserver_windows-amd64.zip
.PHONY : release
.PHONY : release
release :
release :
go get ./...
go get ./...
# Unix
for arch in 386 amd64 ; do \
for arch in 386 amd64 ; do \
for os in darwin linux ; do \
for os in darwin linux ; do \
GOOS = $$ os GOARCH = $$ arch go build -o docker-machine-driver-xenserver_$$ os-$$ arch ; \
GOOS = $$ os GOARCH = $$ arch go build -o docker-machine-driver-xenserver; \
tar -cvzf docker-machine-driver-xenserver_$$ os-$$ arch.tar.gz docker-machine-driver-xenserver; \
rm -f docker-machine-driver-xenserver; \
done \
done \
done
done
# Windows
for arch in 386 amd64 ; do \
GOOS = windows GOARCH = $$ arch go build -o docker-machine-driver-xenserver.exe; \
zip docker-machine-driver-xenserver_windows-$$ arch.zip docker-machine-driver-xenserver.exe; \
rm -f docker-machine-driver-xenserver; \
done