From 6ba419a74bd0ade0aa060944005317634c7ce909 Mon Sep 17 00:00:00 2001 From: Adrian Macneil Date: Wed, 24 Jan 2018 11:30:08 -0800 Subject: [PATCH] Move cmd to project root for easier installs (#29) --- Makefile | 6 +++--- README.md | 2 +- cmd/dbmate/main.go => main.go | 0 cmd/dbmate/main_test.go => main_test.go | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename cmd/dbmate/main.go => main.go (100%) rename cmd/dbmate/main_test.go => main_test.go (100%) diff --git a/Makefile b/Makefile index e265fea..128ac0e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ DC := docker-compose BUILD_FLAGS := -ldflags '-s' -PACKAGES := ./cmd/... ./pkg/... +PACKAGES := . ./pkg/... .PHONY: all all: dep install test lint build @@ -29,9 +29,9 @@ clean: .PHONY: build build: clean - GOARCH=amd64 go build $(BUILD_FLAGS) -o dist/dbmate-linux-amd64 ./cmd/dbmate + GOARCH=amd64 go build $(BUILD_FLAGS) -o dist/dbmate-linux-amd64 . # musl target does not support sqlite - GOARCH=amd64 CGO_ENABLED=0 go build $(BUILD_FLAGS) -o dist/dbmate-linux-musl-amd64 ./cmd/dbmate + GOARCH=amd64 CGO_ENABLED=0 go build $(BUILD_FLAGS) -o dist/dbmate-linux-musl-amd64 . .PHONY: docker docker: diff --git a/README.md b/README.md index 5a351d6..4679ee6 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ $ heroku run bin/dbmate-heroku up Dbmate can be installed directly using `go get`: ```sh -$ go get -u github.com/amacneil/dbmate/cmd/dbmate +$ go get -u github.com/amacneil/dbmate ``` ## Commands diff --git a/cmd/dbmate/main.go b/main.go similarity index 100% rename from cmd/dbmate/main.go rename to main.go diff --git a/cmd/dbmate/main_test.go b/main_test.go similarity index 100% rename from cmd/dbmate/main_test.go rename to main_test.go