2021-08-16 13:20:27 +02:00
|
|
|
.PHONY: setup
|
|
|
|
|
|
|
|
SHELL = bash
|
|
|
|
|
|
|
|
all: setup
|
|
|
|
|
|
|
|
setup:
|
|
|
|
command -v pre-commit > /dev/null && pre-commit install
|
|
|
|
|
|
|
|
# https://google.github.io/styleguide/shellguide.html
|
|
|
|
shell-format:
|
|
|
|
shfmt -f . | xargs shfmt -i 2 -ci -sr -kp -w
|
|
|
|
|
|
|
|
shell-check:
|
|
|
|
shfmt -f . | xargs shfmt -i 2 -ci -sr -kp -d
|
2021-08-16 22:59:42 +02:00
|
|
|
shfmt -f . | xargs shellcheck --color=always --severity=$${SEVERITY:-style}
|
2021-09-11 04:45:07 +02:00
|
|
|
|
|
|
|
VERSION:
|
|
|
|
tools/version.sh
|
2021-10-15 14:59:59 +02:00
|
|
|
|
|
|
|
.PHONY: tarball
|
|
|
|
tarball: VERSION
|
|
|
|
$(MAKE) -C legacy build
|
|
|
|
cd .. && tar -czf libretime-$(shell cat VERSION | tr -d [:blank:]).tar.gz \
|
|
|
|
--owner=root --group=root \
|
|
|
|
--exclude-vcs \
|
|
|
|
--exclude .codespellignore \
|
|
|
|
--exclude .git* \
|
|
|
|
--exclude .pre-commit-config.yaml \
|
|
|
|
--exclude dev_tools \
|
|
|
|
--exclude jekyll.sh \
|
|
|
|
--exclude legacy/vendor/phing \
|
|
|
|
--exclude legacy/vendor/simplepie/simplepie/tests \
|
|
|
|
libretime
|
|
|
|
mv ../libretime-*.tar.gz .
|
2022-01-18 18:55:53 +01:00
|
|
|
|
|
|
|
# Only clean subdirs
|
|
|
|
clean:
|
|
|
|
git clean -xdf */
|