1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

move deps installation to vendor.sh script

This commit is contained in:
Wes Morgan 2013-08-26 15:51:22 -07:00 committed by Solomon Hykes
parent d757bd0904
commit 20d24a450c
3 changed files with 32 additions and 7 deletions

1
.gitignore vendored
View file

@ -14,3 +14,4 @@ docs/_templates
.gopath/ .gopath/
.dotcloud .dotcloud
*.test *.test
vendor/

View file

@ -35,7 +35,7 @@ run apt-get install -y -q mercurial
# Install Go # Install Go
run curl -s https://go.googlecode.com/files/go1.1.2.linux-amd64.tar.gz | tar -v -C /usr/local -xz run curl -s https://go.googlecode.com/files/go1.1.2.linux-amd64.tar.gz | tar -v -C /usr/local -xz
env PATH /usr/local/go/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin env PATH /usr/local/go/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
env GOPATH /go env GOPATH /go:/vendor
env CGO_ENABLED 0 env CGO_ENABLED 0
run cd /tmp && echo 'package main' > t.go && go test -a -i -v run cd /tmp && echo 'package main' > t.go && go test -a -i -v
# Ubuntu stuff # Ubuntu stuff
@ -50,15 +50,10 @@ run /bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_
# Runtime dependencies # Runtime dependencies
run apt-get install -y -q iptables run apt-get install -y -q iptables
run apt-get install -y -q lxc run apt-get install -y -q lxc
# Download dependencies
run PKG=github.com/kr/pty REV=27435c699; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV
run PKG=github.com/gorilla/context/ REV=708054d61e5; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV
run PKG=github.com/gorilla/mux/ REV=9b36453141c; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV
run PKG=github.com/dotcloud/tar/ REV=e5ea6bb21a3294; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV
run PKG=code.google.com/p/go.net/ REV=84a4013f96e0; hg clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && hg checkout $REV
volume /var/lib/docker volume /var/lib/docker
workdir /go/src/github.com/dotcloud/docker workdir /go/src/github.com/dotcloud/docker
# Wrap all commands in the "docker-in-docker" script to allow nested containers # Wrap all commands in the "docker-in-docker" script to allow nested containers
entrypoint ["hack/dind"] entrypoint ["hack/dind"]
# Upload docker source # Upload docker source
add vendor /vendor
add . /go/src/github.com/dotcloud/docker add . /go/src/github.com/dotcloud/docker

29
vendor.sh Executable file
View file

@ -0,0 +1,29 @@
#!/bin/bash
# Downloads dependencies into vendor/ directory
if [[ ! -d vendor ]]; then
mkdir vendor
fi
vendor_dir=${PWD}/vendor
git_clone () {
PKG=$1
REV=$2
if [[ ! -d src/$PKG ]]; then
cd $vendor_dir && git clone http://$PKG src/$PKG && cd src/$PKG && git checkout -f $REV
fi
}
git_clone github.com/kr/pty 27435c699
git_clone github.com/gorilla/context/ 708054d61e5
git_clone github.com/gorilla/mux/ 9b36453141c
git_clone github.com/dotcloud/tar/ d06045a6d9
# Docker requires code.google.com/p/go.net/websocket
PKG=code.google.com/p/go.net REV=84a4013f96e0
if [[ ! -d src/$PKG ]]; then
cd $vendor_dir && hg clone https://$PKG src/$PKG && cd src/$PKG && hg checkout -r $REV
fi