-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (32 loc) · 1.16 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
PREFIX := /usr
BINDIR := ${PREFIX}/bin
DATADIR := ${PREFIX}/share
# The directory to install the asset files (CSS, JS, etc) in.
ASSETS := ${DATADIR}/idoc/assets
.check-version:
@test $${VERSION?The VERSION variable must be set}
build:
inko pkg sync
inko build --define "idoc.cmd.ASSETS=$$(realpath --canonicalize-missing ${ASSETS})" -o ./build/idoc
install: build
install -D --mode=755 build/idoc ${DESTDIR}${BINDIR}/idoc
mkdir -p ${DESTDIR}${ASSETS}
cp --recursive assets/* ${DESTDIR}${ASSETS}
uninstall:
rm --force ${BINDIR}/idoc
rm --recursive --force ${ASSETS}
release/version: .check-version
sed -E -i -e "s/^let VERSION = '([^']+)'$$/let VERSION = '${VERSION}'/" \
src/idoc/cmd.inko
release/changelog: .check-version
clogs "${VERSION}"
release/commit: .check-version
git add .
git commit -m "Release v${VERSION}"
git push origin "$$(git rev-parse --abbrev-ref HEAD)"
release/tag: .check-version
git tag -a -m "Release v${VERSION}" "v${VERSION}"
git push origin "v${VERSION}"
release: release/version release/changelog release/commit release/tag
.PHONY: build install uninstall
.PHONY: release/version release/changelog release/commit release/tag release