-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (57 loc) · 1.36 KB
/
Makefile
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
ARGS = `arg="$(filter-out $@,$(MAKECMDGOALS))" && echo $${arg:-${1}}`
.PHONY: change
change:
docker run \
--rm \
--platform linux/amd64 \
--mount type=bind,source=$(PWD),target=/src \
-w /src \
-it \
ghcr.io/miniscruff/changie \
new
.PHONY: clean
clean:
rm -rf \
*.zip
.PHONY: changelog
changelog:
docker run \
--rm \
--platform linux/amd64 \
--mount type=bind,source=$(PWD),target=/src \
-w /src \
-it \
ghcr.io/miniscruff/changie \
batch $(call ARGS,defaultstring)
docker run \
--rm \
--platform linux/amd64 \
--mount type=bind,source=$(PWD),target=/src \
-w /src \
-it \
ghcr.io/miniscruff/changie \
merge
.PHONY: release
release: clean
@echo "Building release file: chriswiegman-hugo-theme.$(call ARGS,defaultstring).zip"
THEME_VERSION=$(call ARGS,defaultstring) && \
cd ../ && \
zip \
--verbose \
--recurse-paths \
--exclude="*.changes/*" \
--exclude="*.git/*" \
--exclude="*.github/*" \
--exclude="*.vscode/*" \
--exclude="*.changie.yml" \
--exclude="*.gitignore" \
--exclude="*Makefile" \
--exclude="*README.md" \
--exclude="*CHANGELOG.md" \
--exclude="*.zip" \
chriswiegman-hugo-theme/chriswiegman-hugo-theme.$(call ARGS,defaultstring).zip \
chriswiegman-hugo-theme/*
if [ ! -f ./chriswiegman-hugo-theme.$(call ARGS,defaultstring).zip ]; then \
echo "file not available"; \
exit 1; \
fi