Skip to content

Commit

Permalink
Fix help messages in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed Jul 20, 2023
1 parent bd22ddf commit 53d0de4
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ IGNORED_PACKAGES := \
PACKAGES := $(shell go list ./...)
TEST_PACKAGES := $(filter-out $(IGNORED_PACKAGES),$(PACKAGES))

run: build # @HELP Builds and run the enduro binary.
run: # @HELP Builds and run the enduro binary.
run: build
./build/enduro

build: # @HELP Builds the enduro binary.
Expand All @@ -81,12 +82,15 @@ test-race: $(GOTESTSUM) # @HELP Tests using gotestsum and the race detector.
gotestsum $(TEST_PACKAGES) -- -race

ignored: # @HELP Prints ignored packages.
ignored:
$(foreach PACKAGE,$(IGNORED_PACKAGES),@echo $(PACKAGE)$(NEWLINE))

lint: $(GOLANGCI_LINT) # @HELP Lints the code using golangci-lint.
lint: # @HELP Lints the code using golangci-lint.
lint: $(GOLANGCI_LINT)
golangci-lint run -v --timeout=5m --fix

gen-goa: $(GOA) # @HELP Generates Goa assets.
gen-goa: # @HELP Generates Goa assets.
gen-goa: $(GOA)
goa gen github.com/artefactual-labs/enduro/internal/api/design -o internal/api
@$(MAKE) gen-goa-json-pretty

Expand All @@ -99,25 +103,32 @@ gen-goa-json-pretty: $(JQ)
done

clean: # @HELP Cleans temporary files.
clean:
rm -rf ./build ./dist

release-test-config: $(GORELEASER) # @HELP Tests the goreleaser config.
release-test-config: # @HELP Tests the goreleaser config.
release-test-config: $(GORELEASER)
goreleaser --snapshot --skip-publish --clean

release-test: $(GORELEASER) # @HELP Tests the release with goreleaser.
release-test: # @HELP Tests the release with goreleaser.
release-test: $(GORELEASER)
goreleaser --skip-publish

website: $(HUGO) # @HELP Serves the website for development.
website: # @HELP Serves the website for development.
website: $(HUGO)
hugo serve --source=website/

ui: # @HELP Builds the UI.
ui:
npm --prefix=ui install
npm --prefix=ui run build

ui-dev:
ui-dev: # @HELP Serves the UI for development.
npm --prefix=ui run dev

ui-client: # @HELP Generates the UI client using openapi-generator-cli.
ui-client:
rm -rf $(CURDIR)/ui/src/client
docker container run --rm --user $(shell id -u):$(shell id -g) --volume $(CURDIR):/local openapitools/openapi-generator-cli:v6.6.0 \
generate \
Expand All @@ -130,9 +141,11 @@ ui-client: # @HELP Generates the UI client using openapi-generator-cli.
echo "@@@@ Please, review all warnings generated by openapi-generator-cli above!"

db: # @HELP Opens the MySQL CLI.
db:
docker compose exec --user=root mysql mysql -hlocalhost -uroot -proot123

flush: # @HELP Flushes the enduro database.
flush:
docker compose exec --user=root mysql mysql -hlocalhost -uroot -proot123 -e "drop database enduro"
docker compose exec --user=root mysql mysql -hlocalhost -uroot -proot123 -e "create database enduro"

Expand Down

0 comments on commit 53d0de4

Please sign in to comment.