Skip to content

Commit b2c89c7

Browse files
committed
Clean up Makefile targets
* move echo-source and echo-database targets so the build target is first and default * mark echo-source and echo-database targets as .PHONY
1 parent a4c42d7 commit b2c89c7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Makefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ TEST_FLAGS ?=
66
REPO_OWNER ?= $(shell cd .. && basename "$$(pwd)")
77
COVERAGE_DIR ?= .coverage
88

9-
echo-source:
10-
@echo "$(SOURCE)"
11-
12-
echo-database:
13-
@echo "$(DATABASE)"
14-
159
build:
1610
CGO_ENABLED=0 go build -ldflags='-X main.Version=$(VERSION)' -tags '$(DATABASE) $(SOURCE)' ./cmd/migrate
1711

@@ -104,6 +98,12 @@ release:
10498
git tag v$(V)
10599
@read -p "Press enter to confirm and push to origin ..." && git push origin v$(V)
106100

101+
echo-source:
102+
@echo "$(SOURCE)"
103+
104+
echo-database:
105+
@echo "$(DATABASE)"
106+
107107

108108
define external_deps
109109
@echo '-- $(1)'; go list -f '{{join .Deps "\n"}}' $(1) | grep -v github.com/$(REPO_OWNER)/migrate | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}'
@@ -113,7 +113,7 @@ endef
113113

114114
.PHONY: build build-docker build-cli clean test-short test test-with-flags html-coverage \
115115
restore-import-paths rewrite-import-paths list-external-deps release \
116-
docs kill-docs open-docs kill-orphaned-docker-containers
116+
docs kill-docs open-docs kill-orphaned-docker-containers echo-source echo-database
117117

118118
SHELL = /bin/sh
119119
RAND = $(shell echo $$RANDOM)

0 commit comments

Comments
 (0)