Skip to content

Commit

Permalink
feat: redesign config (#19)
Browse files Browse the repository at this point in the history
Signed-off-by: tkrop <[email protected]>
  • Loading branch information
tkrop committed Jan 12, 2024
1 parent 5ae713c commit d9836a3
Show file tree
Hide file tree
Showing 18 changed files with 273 additions and 2,316 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ^1.21
go-version: 1.21

- name: Build and tests
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
LANG: en_US.UTF-8
run: make --file=Makefile.base all
run: make --file=config/Makefile.base --trace all

- name: Send coverage report
uses: shogo82148/actions-goveralls@v1
Expand All @@ -28,11 +28,11 @@ jobs:
GH_TOKEN: ${{ github.token }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |-
make --file=Makefile.base --trace release
make --file=config/Makefile.base --trace release
- name: Publish new version
env:
GH_TOKEN: ${{ github.token }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |-
make --file=Makefile.base --trace publish || true
make --file=config/Makefile.base --trace publish || true
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ else
$(warning warning: please customize variables in Makefile.vars)
endif

#GOBIN := $(CURDIR)/build/bin
#PATH := $(GOBIN):$(PATH)
GOBIN ?= $(shell go env GOPATH)/bin
GOMAKE ?= github.com/tkrop/[email protected]
TARGETS := $(shell command -v go-make >/dev/null || \
go install $(GOMAKE) && go-make targets)
GOMAKE ?= github.com/tkrop/[email protected]
TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \
make -f config/Makefile.base install >/dev/stderr && \
$(GOBIN)/go-make targets)

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

# 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);
@$(GOBIN)/go-make $(strip $(MAKEFLAGS) $(MAKECMDGOALS));
Loading

0 comments on commit d9836a3

Please sign in to comment.