Skip to content

Commit

Permalink
Merge pull request #75 from Antiz96/offload_support
Browse files Browse the repository at this point in the history
Add -o/--offload support to rebuild-todo
  • Loading branch information
Foxboron authored Jul 14, 2024
2 parents 655a2fa + 0afee25 commit c53a022
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions package/rebuild-todo
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ usage() {
-i, --ignore Give one or more pkgbases to ignore
-f, --filter Filter for one or more maintainers (orphan for orphan packages)
-e, --edit Edit PKGBUILD before building. Default when todo type is "Task"
-o, --offload Use offloaded builds
-h, --help Show this help text
--dry-run Show the offload-build and commitpkg being ran
--no-build Don't build PKGBUILD
Expand All @@ -43,6 +44,9 @@ usage() {
Rebuilds all packages in [extra] towards [extra] ignoring "archlinux-contrib"
$ ${PROGNAME} -i "archlinux-contrib" "https://archlinux.org/todo/some-todo-list/"
Rebuilds all packages in [extra] towards [extra] using offloaded builds
$ ${PROGNAME} -o "https://archlinux.org/todo/some-todo-list/"
Rebuilds all packages from [extra] towards [extra-testing]
$ ${PROGNAME} --extra --testing "https://archlinux.org/todo/some-todo-list/"
Expand All @@ -64,6 +68,7 @@ EDIT_PKGBUILD=0
CONTINUE=0
SKIP_BROKEN=0
URL=""
OFFLOAD=""
REPO=""
message=""
filter=("extra")
Expand Down Expand Up @@ -101,6 +106,9 @@ while ((${#})); do
-e|--edit)
EDIT_PKGBUILD=1
;;
-o|--offload)
OFFLOAD="$key"
;;
-d|--dry-run)
DRY=1
;;
Expand Down Expand Up @@ -195,7 +203,7 @@ if ((DRY)); then
echo "Would rebuild the following packages:"
printf ' %s\n' "${packages[@]}"
echo "With:"
echo " pkgctl build --rebuild $REPO"
echo " pkgctl build --rebuild $REPO $OFFLOAD"
echo " pkgctl release --db-update $REPO -m \"$message\""
exit 0
fi
Expand Down Expand Up @@ -225,7 +233,7 @@ for pkg in "${packages[@]}"; do
if ! ((NO_BUILD)); then
SKIP_BUILD=0
while true; do
if pkgctl build --rebuild $REPO; then
if pkgctl build --rebuild $REPO $OFFLOAD; then
rebuilt_packages+=("$pkg")
break
else
Expand Down

0 comments on commit c53a022

Please sign in to comment.