Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile - github.com/peaceiris/hugo-theme-iris.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ba3b900d18bc5c5536b197fd796bd73b9fa68bbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
include .env

pwd := $(CURDIR)
cmd := ""
DOCKER_COMPOSE := docker-compose
GH_USER_ID := peaceiris


.PHONY: up
up:
	$(DOCKER_COMPOSE) up -d
	$(DOCKER_COMPOSE) exec hugo hugo \
		server --navigateToChanged --bind=0.0.0.0 --buildDrafts --i18n-warnings

.PHONY: npm-up
npm-up:
	cd ./exampleSite && \
	hugo server --navigateToChanged --buildDrafts --i18n-warnings

.PHONY: hugo
hugo:
	# make hugo cmd="version"
	$(DOCKER_COMPOSE) run --rm --entrypoint=hugo hugo $(cmd)

.PHONY: bumphugo
bumphugo:
	bash ./scripts/bump_hugo.sh

.PHONY: build
build:
	$(eval opt := --minify --cleanDestinationDir)
	$(DOCKER_COMPOSE) run --rm --entrypoint=hugo hugo $(opt)

.PHONY: npm-build
npm-build:
	cd ./exampleSite && \
	hugo --minify --cleanDestinationDir

.PHONY: test
test:
	$(eval opt := --minify \
		--renderToMemory --i18n-warnings --path-warnings --debug)
	$(DOCKER_COMPOSE) run --rm --entrypoint=hugo hugo $(opt)

.PHONY: npm-test
npm-test:
	cd ./exampleSite && \
	hugo --minify \
		--renderToMemory --i18n-warnings --path-warnings --debug

.PHONY: metrics
metrics:
	$(eval opt := --minify \
		--renderToMemory --i18n-warnings --path-warnings --debug \
		--templateMetrics --templateMetricsHints)
	$(DOCKER_COMPOSE) run --rm --entrypoint=hugo hugo $(opt)

.PHONY: cibuild
cibuild:
	cd ./exampleSite && \
		hugo --minify --cleanDestinationDir \
			--environment "staging" \
			--i18n-warnings --path-warnings --debug \
			--templateMetrics --templateMetricsHints

.PHONY: cibuild-prod
cibuild-prod:
	cd ./exampleSite && \
		hugo --minify --cleanDestinationDir \
			--i18n-warnings --path-warnings && \
		wget -O ./public/report.html ${BASE_URL}/report.html || true

.PHONY: fetchdata
fetchdata:
	cd ./exampleSite && \
		bash ./scripts/fetch_data.sh ${GH_USER_ID} > ./data/github/${GH_USER_ID}.json && \
		deno run --allow-net --allow-read --allow-write --unstable scripts/fetch_images.ts