#!/bin/bash
# Copyright (c) 2021, Alex Leigh. All Rights Reserved.
#
# Build the public archives for the astronomy project and publish them to the Massive distribution point.

# This is very sensitive to order!
#for PKG in leigh-astro leigh-mecha-exec leigh-mecha leigh-eo leigh-gnusto leigh-radio leigh-esp-sdk leigh-eo-schema leigh-esp-sdk leigh-eo-json dumptruckman-busscript onarandombox-multiverse-core mineacademy-foundation
for PKG in dumptruckman-busscript onarandombox-multiverse-core mineacademy-foundation

do
  echo Processing $PKG...
  (cd $PKG;gradle clean publish -x test --parallel --refresh-dependencies)
  rsync -r --progress $PKG/build/repos/* massive.leigh-co.com:/var/www/html &
done
wait
