Compare commits

..

1 commit

Author SHA1 Message Date
63db4337cf
wip: report package sizes
All checks were successful
/ check (push) Successful in 48s
/ build (audiomenu) (push) Successful in 2s
/ build (docs) (push) Successful in 3s
/ build (jpassmenu) (push) Successful in 2s
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Successful in 19s
/ build (nvim) (push) Successful in 10s
/ report-size (pull_request) Successful in 29s
Added as a comment to the current pull request
2024-12-15 00:45:58 +01:00

View file

@ -1,6 +1,6 @@
#!/bin/sh
package_size_table() {
create_table() {
packages=$(nix flake show --json 2>/dev/null | jq --raw-output '.packages."x86_64-linux" | ".#" + keys[]')
# we want to split the words as each of them is a different installable
# shellcheck disable=SC2086
@ -19,18 +19,7 @@ package_size_table() {
if [ "$CI" = "true" ]; then
tea login add --url "$GITHUB_SERVER_URL" --token "$GITHUB_TOKEN"
pr_index=$(tea pulls -f index,head -o simple | grep "$GITHUB_HEAD_REF" | head -n1 | cut -d' ' -f 1)
tea comment "$pr_index" "$(
cat <<-EOF
### NixOS Configurations sizes
TODO
### Package sizes
$(package_size_table)
EOF
)"
else
package_size_table
tea pulls list
fi
create_table