chore: use .env file in make tasks
This commit is contained in:
parent
b449e46f41
commit
9281685f09
12
Makefile
12
Makefile
|
@ -6,15 +6,16 @@ TAILWINDCSS_ARGS ?=
|
||||||
GORELEASER_VERSION ?= v1.8.3
|
GORELEASER_VERSION ?= v1.8.3
|
||||||
GORELEASER_ARGS ?= --auto-snapshot --rm-dist
|
GORELEASER_ARGS ?= --auto-snapshot --rm-dist
|
||||||
GITCHLOG_ARGS ?=
|
GITCHLOG_ARGS ?=
|
||||||
|
SHELL := /bin/bash
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
help: ## Display this help
|
help: ## Display this help
|
||||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
||||||
watch: ## Watching updated files - live reload
|
watch: deps ## Watching updated files - live reload
|
||||||
go run -mod=readonly github.com/cortesi/modd/cmd/modd@latest
|
( set -o allexport && source .env && set +o allexport && go run -mod=readonly github.com/cortesi/modd/cmd/modd@latest )
|
||||||
|
|
||||||
test: .env ## Executing tests
|
test: deps ## Executing tests
|
||||||
( set -o allexport && source .env && set +o allexport && go test -v -race -count=1 $(GOTEST_ARGS) ./... )
|
( set -o allexport && source .env && set +o allexport && go test -v -race -count=1 $(GOTEST_ARGS) ./... )
|
||||||
|
|
||||||
lint: ## Lint sources code
|
lint: ## Lint sources code
|
||||||
|
@ -35,19 +36,18 @@ internal/server/assets/dist/main.css: tailwind
|
||||||
cp .env.dist .env
|
cp .env.dist .env
|
||||||
|
|
||||||
.PHONY: deps
|
.PHONY: deps
|
||||||
deps: node_modules
|
deps: .env node_modules
|
||||||
|
|
||||||
node_modules:
|
node_modules:
|
||||||
npm ci
|
npm ci
|
||||||
|
|
||||||
.PHONY: release
|
.PHONY: release
|
||||||
release: deps
|
release: deps
|
||||||
VERSION=$(GORELEASER_VERSION) curl -sfL https://goreleaser.com/static/run | bash /dev/stdin $(GORELEASER_ARGS)
|
( set -o allexport && source .env && set +o allexport && VERSION=$(GORELEASER_VERSION) curl -sfL https://goreleaser.com/static/run | bash /dev/stdin $(GORELEASER_ARGS) )
|
||||||
|
|
||||||
.PHONY: changelog
|
.PHONY: changelog
|
||||||
changelog:
|
changelog:
|
||||||
go run -mod=readonly github.com/git-chglog/git-chglog/cmd/git-chglog@v0.15.1 $(GITCHLOG_ARGS)
|
go run -mod=readonly github.com/git-chglog/git-chglog/cmd/git-chglog@v0.15.1 $(GITCHLOG_ARGS)
|
||||||
|
|
||||||
|
|
||||||
install-git-hooks:
|
install-git-hooks:
|
||||||
git config core.hooksPath .githooks
|
git config core.hooksPath .githooks
|
Loading…
Reference in New Issue