arch: null artifacts: [] environment: BUILD_SUBMITTER: git.sr.ht image: debian/sid packages: - clang - llvm-dev - pkg-config - libfuse3-dev - cargo - graphviz - mandoc - curl - groff - ghostscript repositories: {} secrets: - e1ab5b37-2c65-4a1a-95d6-baa2e4ecdda9 - 445f9d6e-5745-417f-98b6-ee7367c659d7 shell: false sources: - https://git.sr.ht/~nabijaczleweli/febug#318ca960743d61450d75ccfe2566c25653b52381 tasks: - build-gcc: | cd febug make make clean - build-clang: | cd febug CC=clang CXX=clang++ make - rust: | cd febug make rust-doc - push-manpages: | git -C febug/ worktree add ../febug-man man cd febug-man rm -rf Debian* mv ../febug/out/man Debian sed -e 's/…/.../g' -e 's/\t/ /g' $(find Debian/ -type f -name '*.[123456789]' | awk -F. '{OFS=FS; last=$NF; --NF; print last "\t" $0}' | sort | awk -F'\t' '{print $2 "." $1}') | groff -mdoc -Tps > Debian.ps ps2pdf Debian.ps Debian.pdf git add . git config user.email "nabijaczleweli/autouploader@nabijaczleweli.xyz" git config user.name "наб autouploader" git remote set-url origin 'git@git.sr.ht:~nabijaczleweli/febug' ssh-keyscan git.sr.ht > ~/.ssh/known_hosts git commit -m "Debian manpage update by job $JOB_ID" || exit 0 while true; do git push && break for _ in $(seq 0 10); do sleep 3 git fetch git rebase git push && break 2 done echo "Couldn't push manpages!" exit 1 done - push-rustdoc: | git -C febug/ worktree add ../febug-rustdoc rustdoc cd febug-rustdoc git ls-tree HEAD --name-only -z | grep -zv README.md | xargs -0 rm -r mv ../febug/out/febug.rs/target/doc/* . git add . git commit -m "Rustdoc update by job $JOB_ID" || exit 0 git push - upload-release: | tag="$(git -C febug describe --abbrev=0 --tags || echo HEAD~1)" [ "$(git -C febug rev-list -n1 "$tag")" = "$(git -C febug rev-list -n1 HEAD)" ] || exit 0 mv febug-man/Debian "febug-$tag-man-Debian" mv febug-man/Debian.ps "febug-$tag-man-Debian.ps" mv febug-man/Debian.pdf "febug-$tag-man-Debian.pdf" # mv febug-rustdoc "febug-$tag-rustdoc" rm "febug-$tag-rustdoc/"{README.md,.git} # rm -r febug/out/febug.rs/{target,Cargo.lock} mv febug/out/febug.rs "febug-$tag-rustsrc" # for s in man-Debian rustdoc rustsrc; do tar -cvaf "febug-$tag-$s.tbz2" "febug-$tag-$s" done sha256sum --tag *.tbz2 "febug-$tag-man-Debian".{ps,pdf} set +x # Avoid echoing the token for f in *.tbz2 "febug-$tag-man-Debian".{ps,pdf}; do curl -H "Authorization: Bearer $(cat ~/.release-token)" \ -XPOST \ -F "file=@$f" \ "https://git.sr.ht/api/repos/febug/artifacts/$tag" echo done triggers: [] oauth: ""