Skip to content

Commit

Permalink
fix: some targets (#5)
Browse files Browse the repository at this point in the history
Signed-off-by: tkrop <[email protected]>
  • Loading branch information
tkrop committed Dec 22, 2023
1 parent aa079d2 commit f2427d3
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ else
endif

GOBIN ?= $(shell go env GOPATH)/bin
GOMAKE ?= github.com/tkrop/[email protected].12
GOMAKE ?= github.com/tkrop/[email protected].13
TARGETS := $(shell command -v go-make >/dev/null || \
go install $(GOMAKE) && go-make targets)

# Declare all targets phony to make them available for auto-completion.
.PHONY: $(TARGETS)

# Delegate all targets to go-make in one call.
# TODO: consider solution that does not delegate local goals.
# Delegate all targets to go-make in a single call suppressing other targets.
$(eval $(wordlist 1,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))::;@:)
$(firstword $(MAKECMDGOALS) all)::
$(GOBIN)/go-make $(MAKEFLAGS) $(MAKECMDGOALS);
11 changes: 6 additions & 5 deletions Makefile.base
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,13 @@ push::
@git push --set-upstream origin \
$$(git branch 2> /dev/null | sed -e '/^[^*]/d; s/* \(.*\)/\1/');
#@ pushes the latest changes to the previous commit of the origin.
fix::
fix-commit::
@git commit --amend --no-edit && git push --force;
#@ pushes the latest changes to the previous commit of the origin without verifying them.
fix-no-verify::
@git commit --amend --no-edit --no-verify && git push --force;
#@ pushes the latest changes to the previous commit of the origin updating the message.
fix-update::
#@ pushes the latest changes to the previous commit of the origin updating the commit message.
fix-comment::
@git commit --amend && git push --force;

#@ <version|major|minor|patch[+-]?> # update version and prepare release of the software.
Expand Down Expand Up @@ -942,8 +942,9 @@ lint-apis:: $(GOBIN)/zally
fi; \
ARGS=("--linter-service" "$${LINTER}"); \
if command -v ztoken > /dev/null; then ARGS+=("--token" "$$(ztoken)"); fi; \
if [ -n "$(RUNARGS)" ]; then FILES="$(RUNARGS)"; \
else FILES="$$(find zalando-apis -name "*.yaml" 2>/dev/null)"; fi; \
if [ -z "$(filter %.yaml,$(RUNARGS))" ]; then \
FILES="$$(find zalando-apis -name "*.yaml" 2>/dev/null)"; \
else FILES="$(filter %.yaml,$(RUNARGS))"; fi; \
for APISPEC in $${FILES}; do \
echo "check API: zally \"$${APISPEC}\""; \
zally "$${ARGS[@]}" lint "$${APISPEC}" || exit 1; \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ TARGETS := $(shell command -v go-make >/dev/null || \
# Declare all targets phony to make them available for auto-completion.
.PHONY: $(TARGETS)

# Delegate all targets to go-make in one call.
# TODO: consider solution that does not delegate local goals.
# Delegate all targets to go-make in a single call suppressing other targets.
$(eval $(wordlist 1,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))::;@:)
$(firstword $(MAKECMDGOALS) all)::
$(GOBIN)/go-make $(MAKEFLAGS) $(MAKECMDGOALS);
```
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.12
0.0.13
4 changes: 2 additions & 2 deletions internal/make/fixtures/targets-trace.out
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ clean-run
clean-run-aws
clean-run-db
commit
fix
fix-comment
fix-commit
fix-no-verify
fix-update
go.sum
help
image
Expand Down
4 changes: 2 additions & 2 deletions internal/make/fixtures/targets.out
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ clean-run
clean-run-aws
clean-run-db
commit
fix
fix-comment
fix-commit
fix-no-verify
fix-update
go.sum
help
image
Expand Down

0 comments on commit f2427d3

Please sign in to comment.