use 'dep' for dependency management

This commit is contained in:
mappu 2017-10-29 14:04:26 +13:00
parent 5b42685956
commit f627946c0d
4 changed files with 57 additions and 1 deletions

3
.gitignore vendored
View File

@ -8,3 +8,6 @@ cmd/yatwiki-server/yatwiki-server
# Development db files
cmd/yatwiki-server/*.db
cmd/yatwiki-server/config.json
# Vendor
vendor/

21
Gopkg.lock generated Normal file
View File

@ -0,0 +1,21 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
name = "github.com/mattn/go-sqlite3"
packages = ["."]
revision = "5160b48509cf5c877bc22c11c373f8c7738cdb38"
version = "v1.3.0"
[[projects]]
branch = "master"
name = "golang.org/x/net"
packages = ["context"]
revision = "c73622c77280266305273cb545f54516ced95b93"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "a1f2d643f8c1770c92ee1759184a0c7004af5672869db579328d05bb7cfd6bef"
solver-name = "gps-cdcl"
solver-version = 1

26
Gopkg.toml Normal file
View File

@ -0,0 +1,26 @@
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
[[constraint]]
name = "github.com/mattn/go-sqlite3"
version = "1.3.0"

View File

@ -7,6 +7,7 @@ VERSION:=3.1.2
SOURCES:=Makefile \
static \
cmd $(wildcard cmd/yatwiki-server/*.go) \
Gopkg.lock Gopkg.toml \
$(wildcard *.go)
GOFLAGS:=-a \
@ -18,7 +19,7 @@ GOFLAGS:=-a \
# Phony targets
#
.PHONY: all dist clean
.PHONY: all dist clean deps
all: build/linux64/yatwiki-server build/win32/yatwiki-server.exe
@ -31,6 +32,11 @@ clean:
rm -f ./staticResources.go
rm -fr ./build
rm -f ./yatwiki
deps:
go get -u github.com/jteeuwen/go-bindata/...
go get -u github.com/golang/dep/cmd/dep
dep ensure
#
# Generated files