diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2022-03-20 16:43:47 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2022-03-20 16:43:47 +0100 |
| commit | 0619c7ef198349c11c8ef598c7caa741b3c4c9b0 (patch) | |
| tree | c10369052f44a413e9fe3d035adf876b453c5124 /docs/Makefile | |
| parent | 017eb7b3cb631bb432066539c459bfa96afa0543 (diff) | |
Automatically publish statistics
Diffstat (limited to 'docs/Makefile')
| -rw-r--r-- | docs/Makefile | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/docs/Makefile b/docs/Makefile index 15c20aa..c0b03de 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -52,11 +52,6 @@ html-dir: $(PKG).texi @printf "Generating $@\n" @texi2pdf --clean $< > /dev/null -.PHONY: stats -stats: - @printf "Generating statistics\n" - @gitstats $(GITSTATS_ARGS) $(TOP) $(GITSTATS_DIR) - PUBLISH_PATH ?= /manual/ RELEASE_PATH ?= /manual/$(VERSION)/ S3_BUCKET ?= s3://$(DOMAIN) @@ -86,6 +81,19 @@ release: html html-dir pdf @aws cloudfront create-invalidation --distribution-id $(CFRONT_DIST) --paths \ "$(subst $(space),$(comma),$(addprefix $(RELEASE_PATH),$(CFRONT_PATHS)))" > /dev/null +.PHONY: stats +stats: + @printf "Generating statistics\n" + @$(GITSTATS) $(GITSTATS_ARGS) $(TOP) $(GITSTATS_DIR) + +stats-upload: + @printf "Uploading statistics...\n" + @aws s3 sync $(GITSTATS_DIR) $(S3_BUCKET)/stats/$(PKG) + @printf "Uploaded to $(S3_BUCKET)/stats/$(PKG)\n" + @printf "Generating CDN invalidation\n" + @aws cloudfront create-invalidation \ + --distribution-id $(CFRONT_DIST) --paths "/stats/*" > /dev/null + CLEAN = $(PKG).info dir $(PKG) $(PKG).html $(PKG).pdf clean: |
