-
Notifications
You must be signed in to change notification settings - Fork 24
/
justfile
50 lines (43 loc) · 1.08 KB
/
justfile
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
# Sources
scripts := `find bin -type f -executable -printf "%f "`
manpages := `find doc -type f -name '*.md' -printf "%f "`
# Metadata
version := 'v' + `./bin/downgrade --version`
# Run tests
test:
cram test
# Re-generate translations
locales:
for script_ in {{scripts}}; do \
just _locales "$script_"; \
done
_locales exec:
xgettext \
--from-code=utf-8 -L shell \
--package-name={{exec}} \
--package-version={{version}} \
-o 'locale/{{exec}}.pot' bin/{{exec}}
find \
'locale/{{exec}}' \
-name "*.po" \
-exec msgmerge --update {} 'locale/{{exec}}.pot' \;
sed -i '\
/^# Copyright.*$/d; \
s/^\(# This file is\).*$/\1 put in the public domain./\
' \
'locale/{{exec}}.pot'
# Re-generate man-pages
manpages:
for manpage_ in {{manpages}}; do \
just _manpage "$manpage_"; \
done
_manpage md:
pandoc \
--standalone \
--to man \
--output "doc/$(echo '{{md}}' | sed 's/.md$//')" \
'doc/{{md}}'
release:
git tag --sign --message '{{version}}' '{{version}}'
git push --follow-tags
aur-release downgrade '{{version}}'