mirror of
https://github.com/Bornholm/formidable.git
synced 2024-12-22 06:49:33 +01:00
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_ARGS ?= --auto-snapshot --rm-dist
|
||||
GITCHLOG_ARGS ?=
|
||||
SHELL := /bin/bash
|
||||
|
||||
.PHONY: 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}'
|
||||
|
||||
watch: ## Watching updated files - live reload
|
||||
go run -mod=readonly github.com/cortesi/modd/cmd/modd@latest
|
||||
watch: deps ## Watching updated files - live reload
|
||||
( 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) ./... )
|
||||
|
||||
lint: ## Lint sources code
|
||||
@ -35,19 +36,18 @@ internal/server/assets/dist/main.css: tailwind
|
||||
cp .env.dist .env
|
||||
|
||||
.PHONY: deps
|
||||
deps: node_modules
|
||||
deps: .env node_modules
|
||||
|
||||
node_modules:
|
||||
npm ci
|
||||
|
||||
.PHONY: release
|
||||
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
|
||||
changelog:
|
||||
go run -mod=readonly github.com/git-chglog/git-chglog/cmd/git-chglog@v0.15.1 $(GITCHLOG_ARGS)
|
||||
|
||||
|
||||
install-git-hooks:
|
||||
git config core.hooksPath .githooks
|
Loading…
Reference in New Issue
Block a user