* move echo-source and echo-database targets so the build target is first and default
* mark echo-source and echo-database targets as .PHONY
This commit is contained in:
Dale Hui 2021-08-04 16:19:03 -07:00
Родитель a4c42d7390
Коммит b2c89c743c
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -6,12 +6,6 @@ TEST_FLAGS ?=
REPO_OWNER ?= $(shell cd .. && basename "$$(pwd)")
COVERAGE_DIR ?= .coverage
echo-source:
@echo "$(SOURCE)"
echo-database:
@echo "$(DATABASE)"
build:
CGO_ENABLED=0 go build -ldflags='-X main.Version=$(VERSION)' -tags '$(DATABASE) $(SOURCE)' ./cmd/migrate
@ -104,6 +98,12 @@ release:
git tag v$(V)
@read -p "Press enter to confirm and push to origin ..." && git push origin v$(V)
echo-source:
@echo "$(SOURCE)"
echo-database:
@echo "$(DATABASE)"
define external_deps
@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
.PHONY: build build-docker build-cli clean test-short test test-with-flags html-coverage \
restore-import-paths rewrite-import-paths list-external-deps release \
docs kill-docs open-docs kill-orphaned-docker-containers
docs kill-docs open-docs kill-orphaned-docker-containers echo-source echo-database
SHELL = /bin/sh
RAND = $(shell echo $$RANDOM)