Skip to content

Commit

Permalink
fix(build): Drop duplicate targets supplied by reusable include
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Aug 26, 2024
1 parent 9785cf5 commit 18331d5
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ casile-%.md: CHANGELOG.md
$(SED) -e '/\.\.\.v$*/,/\.\.\.v/!d' $< | \
$(SED) -e '1,3d;N;$$!P;$$!D;$$d' > $@

PHONY_DEVELOPER_TARGETS = lint luacheck stylua checkmake ruff
PHONY_DEVELOPER_TARGETS = lint luacheck stylua checkmake ruff ruff-format
PHONY_DEVELOPER_TARGETS += tagrelease release-preview release
PHONY_DEVELOPER_TARGETS += docker docker-dep-check docker-ghcr-to-hub docker-build-push
.PHONY: $(PHONY_DEVELOPER_TARGETS)
Expand Down Expand Up @@ -225,28 +225,11 @@ CLEANFILES += .aur_deps
$(GREP) -v 'so.$$' | \
$(SORT) > $@

define docker_push =
test -z "$(DOCKER_PAT)" || \
$(DOCKER) login https://$(DOCKER_REGISTRY) -u $(DOCKER_USERNAME) -p $(DOCKER_PAT)
$(DOCKER) push $(DOCKER_REGISTRY)/$(DOCKER_REPO):$(DOCKER_TAG)
if [[ "$(DOCKER_TAG)" == v*.*.* ]]; then \
tag=$(DOCKER_TAG) ; \
$(DOCKER) tag $(DOCKER_REPO):$(DOCKER_TAG) $(DOCKER_REGISTRY)/$(DOCKER_REPO):latest ; \
$(DOCKER) tag $(DOCKER_REPO):$(DOCKER_TAG) $(DOCKER_REGISTRY)/$(DOCKER_REPO):$${tag//.*} ; \
$(DOCKER) push $(DOCKER_REGISTRY)/$(DOCKER_REPO):latest ; \
$(DOCKER) push $(DOCKER_REGISTRY)/$(DOCKER_REPO):$${tag//.*} ; \
fi
endef

docker-ghcr-to-hub:
$(DOCKER) pull $(GHCR_REGISTRY)/$(GHCR_REPO):$(DOCKER_TAG)
$(DOCKER) tag $(GHCR_REGISTRY)/$(GHCR_REPO):$(DOCKER_TAG) $(DOCKER_REGISTRY)/$(DOCKER_REPO):$(DOCKER_TAG)
$(docker_push)

docker-build-push: docker
$(DOCKER) tag $(DOCKER_REPO):$(DOCKER_TAG) $(DOCKER_REGISTRY)/$(DOCKER_REPO):$(DOCKER_TAG)
$(docker_push)

else !DEVELOPER_MODE

$(PHONY_DEVELOPER_TARGETS):
Expand Down

0 comments on commit 18331d5

Please sign in to comment.