Skip to content

Commit

Permalink
Migrate to dep for dependency management (#26)
Browse files Browse the repository at this point in the history
* Replace `Godeps` with `dep`
* Upgrade all dependencies
* Remove vendor source from git repository
  • Loading branch information
amacneil committed Jan 24, 2018
1 parent fbddb76 commit df119a7
Show file tree
Hide file tree
Showing 126 changed files with 110 additions and 222,303 deletions.
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.DS_Store
.env
.git
.gitignore
dist
/dist
/vendor
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
.env
/dist
/testdata/.env
/testdata/db/schema.sql
/vendor
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
install:
- docker version
- docker-compose version
- rm docker-compose.override.yml
- docker-compose pull
- docker-compose build
- docker-compose up -d
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*

# development dependencies
RUN curl -fsSL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64 \
&& chmod +x /usr/local/bin/dep
RUN go get \
github.com/golang/lint/golint \
github.com/kisielk/errcheck
Expand All @@ -22,7 +24,7 @@ COPY . /go/src/github.com/amacneil/dbmate
WORKDIR /go/src/github.com/amacneil/dbmate

# build
RUN make install build
RUN make dep install build

# runtime image
FROM debian:stretch-slim
Expand Down
55 changes: 0 additions & 55 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

63 changes: 63 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.

[[constraint]]
name = "github.com/go-sql-driver/mysql"
branch = "master"

[[constraint]]
name = "github.com/joho/godotenv"
version = "1.2.0"

[[constraint]]
name = "github.com/lib/pq"
branch = "master"

[[constraint]]
name = "github.com/mattn/go-sqlite3"
version = "1.6.0"

[[constraint]]
name = "github.com/stretchr/testify"
version = "1.2.0"

[[constraint]]
name = "github.com/urfave/cli"
version = "1.20.0"
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ BUILD_FLAGS := -ldflags '-s'
PACKAGES := ./cmd/... ./pkg/...

.PHONY: all
all: install test lint build
all: dep install test lint build

.PHONY: dep
dep:
dep ensure -vendor-only

.PHONY: install
install:
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# this file is used to mount the current directory as a volume
# we remove it in CI to use files inside the container only
version: '2.3'
services:
dbmate:
volumes:
- .:/go/src/github.com/amacneil/dbmate
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ services:
build:
context: .
target: build
volumes:
- .:/go/src/github.com/amacneil/dbmate
depends_on:
mysql:
condition: service_healthy
Expand Down
13 changes: 0 additions & 13 deletions vendor/github.com/davecgh/go-spew/LICENSE

This file was deleted.

151 changes: 0 additions & 151 deletions vendor/github.com/davecgh/go-spew/spew/bypass.go

This file was deleted.

0 comments on commit df119a7

Please sign in to comment.