Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: some targets (#5) #5

Merged
merged 3 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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