[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/with-editor ff3e969 077/140: make: Refactor manual publish
From: |
Jonas Bernoulli |
Subject: |
[nongnu] elpa/with-editor ff3e969 077/140: make: Refactor manual publishing |
Date: |
Fri, 6 Aug 2021 12:51:23 -0400 (EDT) |
branch: elpa/with-editor
commit ff3e96929d4532e33422a5980a6e3ca9f2fcf032
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
make: Refactor manual publishing
---
Makefile | 45 +++++++++++++++++++++++++++------------------
1 file changed, 27 insertions(+), 18 deletions(-)
diff --git a/Makefile b/Makefile
index dd4b8be..b4803b3 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,8 @@ ELCS = $(ELS:.el=.elc)
DEPS = dash
+VERSION ?= $(shell test -e $(TOP).git && git describe --tags --abbrev=0 | cut
-c2-)
+
EMACS ?= emacs
EMACS_ARGS ?=
EMACS_ARGS += --eval '(setq with-editor-emacsclient-executable nil)'
@@ -38,10 +40,10 @@ help:
$(info make html-dir - generate html manual directory)
$(info make pdf - generate pdf manual)
$(info make authors - generate AUTHORS.md)
- $(info make preview - preview html manual)
- $(info make publish - publish html manual)
+ $(info make publish - publish snapshot manuals)
+ $(info make release - publish release manuals)
$(info make clean - remove most generated files)
- @printf "\n"
+ @printf "$(VERSION)\n"
lisp: $(ELCS) loaddefs
@@ -108,28 +110,35 @@ html-dir: $(PKG).texi
@texi2pdf --clean $< > /dev/null
DOMAIN ?= magit.vc
-CFRONT_DIST ?= E2LUHBKU1FBV02
PUBLISH_PATH ?= /manual/
-PUBLISH_BUCKET ?= s3://$(DOMAIN)
-PREVIEW_BUCKET ?= s3://preview.$(DOMAIN)
-PUBLISH_TARGET ?= $(PUBLISH_BUCKET)$(PUBLISH_PATH)
-PREVIEW_TARGET ?= $(PREVIEW_BUCKET)$(PUBLISH_PATH)
+RELEASE_PATH ?= /manual/$(VERSION)/
-preview: html html-dir pdf
- @aws s3 cp $(PKG).html $(PREVIEW_TARGET)
- @aws s3 cp $(PKG).pdf $(PREVIEW_TARGET)
- @aws s3 sync --delete $(PKG) $(PREVIEW_TARGET)$(PKG)/
+S3_BUCKET ?= s3://$(DOMAIN)
+PUBLISH_TARGET = $(S3_BUCKET)$(PUBLISH_PATH)
+RELEASE_TARGET = $(S3_BUCKET)$(RELEASE_PATH)
+
+CFRONT_DIST ?= E2LUHBKU1FBV02
+CFRONT_PATHS = $(PKG).html $(PKG).pdf $(PKG)/*
+
+comma := ,
+empty :=
+space := $(empty) $(empty)
publish: html html-dir pdf
@aws s3 cp $(PKG).html $(PUBLISH_TARGET)
- @aws s3 cp $(PKG).pdf $(PUBLISH_TARGET)
+ @aws s3 cp $(PKG).pdf $(PUBLISH_TARGET)
@aws s3 sync --delete $(PKG) $(PUBLISH_TARGET)$(PKG)/
@printf "Generating CDN invalidation\n"
- @aws cloudfront create-invalidation \
- --distribution-id $(CFRONT_DIST) --paths "\
-/manual/$(PKG).html,\
-/manual/$(PKG).pdf,\
-/manual/$(PKG)/*" > /dev/null
+ @aws cloudfront create-invalidation --distribution-id $(CFRONT_DIST)
--paths \
+ "$(subst $(space),$(comma),$(addprefix
$(PUBLISH_PATH),$(CFRONT_PATHS)))" > /dev/null
+
+release: html html-dir pdf
+ @aws s3 cp $(PKG).html $(RELEASE_TARGET)
+ @aws s3 cp $(PKG).pdf $(RELEASE_TARGET)
+ @aws s3 sync --delete $(PKG) $(RELEASE_TARGET)$(PKG)/
+ @printf "Generating CDN invalidation\n"
+ @aws cloudfront create-invalidation --distribution-id $(CFRONT_DIST)
--paths \
+ "$(subst $(space),$(comma),$(addprefix
$(RELEASE_PATH),$(CFRONT_PATHS)))" > /dev/null
CLEAN = $(ELCS) $(PKG)-autoloads.el $(PKG).info dir
CLEAN += $(PKG) $(PKG).html $(PKG).pdf
- [nongnu] elpa/with-editor b0ff338 060/140: manual: put local-variables into an ignored section, (continued)
- [nongnu] elpa/with-editor b0ff338 060/140: manual: put local-variables into an ignored section, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor 6147262 064/140: make: remove clean-texi and clean-all targets, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor f733034 067/140: Ignore additional generated files, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor 93876b6 068/140: manual: use @noindent before version sentence, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor f401e12 071/140: Add some autoload, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor fcbccec 072/140: Use process-live-p to check whether process is alive, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor 3e64247 080/140: Release version 2.7.4, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor cacb41d 062/140: make: use same export settings as for manual Org exports, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor ee39f23 065/140: make: generate CDN invalidation after upload, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor 73d3d1a 066/140: Use the emacsclient again when running shell commands, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor ff3e969 077/140: make: Refactor manual publishing,
Jonas Bernoulli <=
- [nongnu] elpa/with-editor 3ad940c 086/140: Update documentation, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor db11c10 089/140: Release version 2.8.0, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor 46a7b51 090/140: with-editor-{finish, cancel}-hook: No longer ignore global value, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor 66bec91 098/140: Release version 2.8.3, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor bc184cf 075/140: Changing heading of library footer section, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor 22a581d 076/140: make: Remove deleted pages when publishing manual, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor 71e61b9 081/140: with-editor-sleeping-editor: Also print the working directory, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor d3b0bc7 083/140: Update documentation, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor 87c96b3 091/140: with-editor-finish: Preserve local git-commit-post-finish-hook, Jonas Bernoulli, 2021/08/06
- [nongnu] elpa/with-editor ef0ef43 093/140: manual: Call ox-texinfo+-update-copyright-years while exporting, Jonas Bernoulli, 2021/08/06