diff --git a/.build.yml b/.build.yml index 1929dba..e7cd128 100644 --- a/.build.yml +++ b/.build.yml @@ -45,10 +45,12 @@ tasks: ssh-keyscan git.sr.ht > ~/.ssh/known_hosts git push - release: | + set -o posix # bash in non-POSIX mode doesn't process aliases non-interactively. good shell. tag="$(git -C tzpfms describe --abbrev=0 --tags || echo HEAD~1)" [ "$(git -C tzpfms rev-list -n1 "$tag")" = "$(git -C tzpfms rev-list -n1 HEAD)" ] || exit 0 mkdir "tzpfms-$tag-bin-amd64" mv tzpfms/out/zfs-tpm* "tzpfms-$tag-bin-amd64" + mv tzpfms/out/locale "tzpfms-$tag-bin-amd64" mv tzpfms/out/dracut "tzpfms-$tag-dracut" mv tzpfms/out/initramfs-tools "tzpfms-$tag-initramfs-tools" mv tzpfms/out/systemd "tzpfms-$tag-systemd" @@ -60,9 +62,17 @@ tasks: done sha256sum *.tbz2 "tzpfms-$tag-manual.ps" "tzpfms-$tag-manual.pdf" set +x # Avoid echoing the token + alias curl="curl --oauth2-bearer $(cat ~/.release-token)" + id="$(curl -F operations='{"query": "{me {repository(name: \"tzpfms\") {id}}}"}' -F map='{}' https://git.sr.ht/query | tr -cd 0-9)" for f in *.tbz2 "tzpfms-$tag-manual.ps" "tzpfms-$tag-manual.pdf"; do - curl -H "Authorization: Bearer $(cat ~/.release-token)" \ - -XPOST \ - -F "file=@$f" \ - "https://git.sr.ht/api/repos/tzpfms/artifacts/$tag" + curl -F operations='{ + "query": "mutation($id: Int!, $rev: String!, $file: Upload!) {uploadArtifact(repoId: $id, revspec: $rev, file: $file) { created, filename, checksum } }", + "variables": { "file": null, "rev": "'"$(git -C tzpfms rev-list -n1 "$tag")"'", "id": '"$id"' } + }' \ + -F map='{ + "a": ["variables.file"] + }' \ + -F a=@"$f" \ + https://git.sr.ht/query + echo done diff --git a/Makefile b/Makefile index dc3409e..ec6a1ce 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ clean : build : $(subst src/bin/,$(OUTDIR),$(subst .cpp,,$(BINARY_SOURCES))) manpages : $(patsubst man/%.pp,$(OUTDIR)man/%,$(MANPAGE_SOURCES)) htmlpages : $(patsubst man/%.pp,$(OUTDIR)man/%.html,$(MANPAGE_SOURCES)) $(OUTDIR)man/style.css -locales : $(patsubst po/%.po,$(OUTDIR)loc/%/LC_MESSAGES/tzpfms.mo,$(LOCALES)) +locales : $(patsubst po/%.po,$(OUTDIR)locale/%/LC_MESSAGES/tzpfms.mo,$(LOCALES)) i-t : $(OUTDIR)initramfs-tools/usr/share/initramfs-tools/hooks/tzpfms $(OUTDIR)initramfs-tools/usr/share/tzpfms/initramfs-tools-zfs-patch.sh dracut : $(patsubst initrd/dracut/%,$(OUTDIR)dracut/usr/lib/dracut/modules.d/91tzpfms/%,$(sort $(wildcard initrd/dracut/*.sh))) init.d-systemd : $(OUTDIR)systemd/$(SYSTEMD_SYSTEM_UNITDIR)/zfs-load-key@.service.d/tzpfms.conf $(OUTDIR)systemd/usr/libexec/tzpfms-zfs-load-key@ @@ -84,7 +84,7 @@ $(BLDDIR)tzpfms.pot: src/*.[ch]pp src/bin/*.[ch]pp $(NOLOCREGEN)$(foreach l,$(LOCALES),msgmerge --backup=off --no-wrap -Uiq $(l) $@ &&) : @>> $@ -$(OUTDIR)loc/%/LC_MESSAGES/tzpfms.mo : po/%.po $(BLDDIR)tzpfms.pot +$(OUTDIR)locale/%/LC_MESSAGES/tzpfms.mo : po/%.po $(BLDDIR)tzpfms.pot @mkdir -p $(@D) msgfmt --statistics --check-format --check-domain -o $@ $< diff --git a/README.md b/README.md index dc7e434..ee8fbc1 100644 --- a/README.md +++ b/README.md @@ -140,4 +140,5 @@ To all who support further development on Patreon, in particular: * ThePhD * Embark Studios - * Lars Strojny + * Jasper Bekkers + * EvModder diff --git a/man/common.h b/man/common.h index f0c3a2e..01d5c7f 100644 --- a/man/common.h +++ b/man/common.h @@ -8,7 +8,9 @@ ThePhD .It Embark Studios .It -Lars Strojny +Jasper Bekkers +.It +EvModder .El . .Sh REPORTING BUGS diff --git a/src/main.hpp b/src/main.hpp index 900ea53..f952372 100644 --- a/src/main.hpp +++ b/src/main.hpp @@ -28,7 +28,7 @@ static int do_bare_main( V && validate = []() { return 0; }) { setlocale(LC_ALL, ""); bindtextdomain("tzpfms", "/usr/share/locale"); - // bindtextdomain("tzpfms", "out/loc"); + // bindtextdomain("tzpfms", "out/locale"); textdomain("tzpfms"); const auto libz = TRY_PTR("initialise libzfs", libzfs_init());