forked from Masterminds/glide
/
Makefile
43 lines (33 loc) · 1.12 KB
/
Makefile
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
32
33
34
35
36
37
38
39
40
41
42
43
VERSION := $(shell git describe --tags)
DIST_DIRS := find * -type d -exec
build:
go build -o glide -ldflags "-X main.version=${VERSION}" glide.go
install: build
install -d ${DESTDIR}/usr/local/bin/
install -m 755 ./glide ${DESTDIR}/usr/local/bin/glide
test:
go test ./...
clean:
rm -f ./glide.test
rm -f ./glide
bootstrap:
mkdir ./vendor
git clone https://github.com/Masterminds/cookoo vendor/github.com/Masterminds/cookoo
git clone https://github.com/Masterminds/vcs vendor/github.com/Masterminds/vcs
git clone https://github.com/kylelemons/go-gypsy vendor/github.com/kylelemons/go-gypsy
git clone https://github.com/codegangsta/cli vendor/github.com/codegangsta/cli
bootstrap-dist:
go get -u github.com/mitchellh/gox
build-all:
gox -verbose \
-ldflags "-X main.version=${VERSION}" \
-os="linux darwin windows " \
-arch="amd64 386" \
-output="dist/{{.OS}}-{{.Arch}}/{{.Dir}}" .
dist: build-all
cd dist && \
$(DIST_DIRS) cp ../LICENSE.txt {} \; && \
$(DIST_DIRS) cp ../README.md {} \; && \
$(DIST_DIRS) zip -r glide-{}.zip {} \; && \
cd ..
.PHONY: build test install clean bootstrap bootstrap-dist build-all dist