summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBazaah2023-09-09 15:07:46 +0000
committerBazaah2023-09-09 17:10:46 +0000
commit343f78cd0787f220f2948adef12824c3476152b5 (patch)
treee335acb494d6ce679510fd7f9388b810137581c2
parent3ddb7038f95be4805d6e8c66c25e7b58df49c036 (diff)
downloadaur-343f78cd0787f220f2948adef12824c3476152b5.tar.gz
justfile: improvements to upload to handle new packages
Now use an @all alias instead of naming packages directly, and pretty print the uploadees with column -t (from util-linux)
-rw-r--r--justfile13
1 files changed, 9 insertions, 4 deletions
diff --git a/justfile b/justfile
index aaa98750e22a..5d87d429a4b0 100644
--- a/justfile
+++ b/justfile
@@ -24,7 +24,7 @@ mkchroot: (_mkchroot ChrootBase)
# Install required dependencies
deps:
- pacman -S base-devel sudo devtools ripgrep --needed --noconfirm
+ pacman -S base-devel util-linux sudo devtools ripgrep --needed --noconfirm
# Clean one or more of: chroot|deps|artifacts|logs
clean +what="chroot":
@@ -53,7 +53,7 @@ clean +what="chroot":
done
# Upload built artifacts to Github, using the associated release
-upload pkg="ceph,ceph-libs,ceph-mgr": (_upload pkg)
+upload pkg="@all": (_upload pkg)
# Initialize the chroot
@_mkchroot $cbase:
@@ -70,11 +70,16 @@ _upload $pkgstring:
#!/usr/bin/env bash
set -euo pipefail
- [[ -n "$GITHUB_TOKEN" ]] || { $Say "Error: GITHUB_TOKEN must be set" && exit 4; }
+ [[ -v GITHUB_TOKEN ]] || { $Say "Error: GITHUB_TOKEN must be set" && exit 4; }
IFS=', ' read -r -a PKGS <<<"$pkgstring"
+ if printf '%s\0' "${PKGS[@]}" | grep -zxqF -- '@all'; then
+ $Say Expanding '@all' to package set
+ PKGS=($(rg -P --only-matching --replace '$1' '^package_(.+)\(\) {' {{PkgBuild}} | sort | xargs))
+ fi
- $Say "uploading package(s): { ${PKGS[@]} } to {{GithubRepo}}/releases/v{{PkgVer}}-{{PkgRel}}"
+ $Say "Uploading ${#PKGS[@]} package(s) to {{GithubRepo}}/releases/v{{PkgVer}}-{{PkgRel}}"
+ printf ' > %s %s %s %s %s\n' "${PKGS[@]}" | column -t
declare -A FILES
for pkg in "${PKGS[@]}"; do