doc: improve makefile
All checks were successful
Continuous Integration / lint_n_build (push) Successful in 19s
All checks were successful
Continuous Integration / lint_n_build (push) Successful in 19s
This commit is contained in:
10
Makefile
10
Makefile
@@ -19,7 +19,7 @@ RPM_BUILD_PATH = $(RPM_RPMDIR)/$(ARCH)/$(NAME)-$(VERSION)-$(RELEASE).$(ARCH).rpm
|
|||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
help:
|
help:
|
||||||
@grep -E '^[a-zA-Z_-]+:.*?## .*' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
||||||
.PHONY: name
|
.PHONY: name
|
||||||
name: ## Show project name
|
name: ## Show project name
|
||||||
@@ -38,7 +38,7 @@ arch: ## Show rpm arch target
|
|||||||
@echo "$(ARCH)"
|
@echo "$(ARCH)"
|
||||||
|
|
||||||
.PHONY: owner
|
.PHONY: owner
|
||||||
owner: # Show project owner name
|
owner: ## Show project owner name
|
||||||
@echo "$(OWNER)"
|
@echo "$(OWNER)"
|
||||||
|
|
||||||
.PHONY: summary
|
.PHONY: summary
|
||||||
@@ -54,7 +54,7 @@ url: ## Show project homepage URL
|
|||||||
@echo "$(URL)"
|
@echo "$(URL)"
|
||||||
|
|
||||||
.PHONY: source0
|
.PHONY: source0
|
||||||
source0: ## Show source name
|
source0: ## Show rpm source0 file name
|
||||||
@echo "$(SOURCE0)"
|
@echo "$(SOURCE0)"
|
||||||
|
|
||||||
$(RPM_TARBALL_PATH): *
|
$(RPM_TARBALL_PATH): *
|
||||||
@@ -74,7 +74,7 @@ install: ## Install files into rpm dest (requires env var DESTDIR)
|
|||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
install --directory $(DESTDIR)$(RPM_SYSCONFDIR)/nginx/conf.d $(DESTDIR)$(RPM_SYSCONFDIR)/certbot $(DESTDIR)$(RPM_UNITDIR) $(DESTDIR)$(RPM_SBINDIR)
|
install --directory $(DESTDIR)$(RPM_SYSCONFDIR)/nginx/conf.d $(DESTDIR)$(RPM_SYSCONFDIR)/certbot $(DESTDIR)$(RPM_UNITDIR) $(DESTDIR)$(RPM_SBINDIR)
|
||||||
install --target-directory=$(DESTDIR)$(RPM_SYSCONFDIR)/nginx/conf.d files/nginx/0_security.conf files/nginx/z_default.conf
|
install --mode=755 --target-directory=$(DESTDIR)$(RPM_SYSCONFDIR)/nginx/conf.d files/nginx/0_security.conf files/nginx/z_default.conf
|
||||||
install --mode=600 --target-directory=$(DESTDIR)$(RPM_SYSCONFDIR)/certbot files/certbot/ovh.ini
|
install --mode=600 --target-directory=$(DESTDIR)$(RPM_SYSCONFDIR)/certbot files/certbot/ovh.ini
|
||||||
install --mode=644 --target-directory=$(DESTDIR)$(RPM_UNITDIR) files/systemd/certbot-renew.service files/systemd/certbot-renew.timer
|
install --mode=644 --target-directory=$(DESTDIR)$(RPM_UNITDIR) files/systemd/certbot-renew.service files/systemd/certbot-renew.timer
|
||||||
install --mode=755 --target-directory=$(DESTDIR)$(RPM_SBINDIR) files/sbin/certbot_renew
|
install --mode=755 --target-directory=$(DESTDIR)$(RPM_SBINDIR) files/sbin/certbot_renew
|
||||||
@@ -82,7 +82,7 @@ install: ## Install files into rpm dest (requires env var DESTDIR)
|
|||||||
.PHONY: upload
|
.PHONY: upload
|
||||||
upload: ## Upload rpm package to Gitea repository (requires env var PKG_TOKEN)
|
upload: ## Upload rpm package to Gitea repository (requires env var PKG_TOKEN)
|
||||||
@if [ -z "$(PKG_TOKEN)" ]; then \
|
@if [ -z "$(PKG_TOKEN)" ]; then \
|
||||||
printf "[CRITICAL] Missing env var PKG_TOKEN\n[CRITICAL] This command is designed to be called by Gitea Actions only\n" 1>&2; \
|
printf "[CRITICAL] Missing env var PKG_TOKEN\n[CRITICAL] This command is designed to be called by Gitea Actions only!\n" 1>&2; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
curl --fail-with-body --upload-file "$(RPM_BUILD_PATH)" --user "$(OWNER):$(PKG_TOKEN)" https://git.netoik.io/api/packages/$(OWNER)/rpm/upload
|
curl --fail-with-body --upload-file "$(RPM_BUILD_PATH)" --user "$(OWNER):$(PKG_TOKEN)" https://git.netoik.io/api/packages/$(OWNER)/rpm/upload
|
||||||
|
|||||||
Reference in New Issue
Block a user