From a59a1edc34c8139419adf8029c725de604f92470 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 15 Apr 2021 12:59:53 +0200 Subject: Redo stage script to first prepare everything and then upload --- stage | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'stage') diff --git a/stage b/stage index ab2722b..bd4cbc0 100755 --- a/stage +++ b/stage @@ -204,6 +204,9 @@ for f in "${scripts[@]}"; do checksum_line "$f" done +##fi +## + # Sync the distribution. # # Note that we do the distribution first so that the toolchain changes are @@ -226,27 +229,27 @@ function sync_dist () # [] --prune-empty-dirs $rsync_ops "$@" "$s/" "$d/" } -sync_dist "$dist_src" "$dist_dst" $rsync_del - -# Also sync (disable) queue. +# If we are not preparing packages, publish the distribution now. Otherwise, +# wait until we have prepared all the packages (which can take a considerable +# time). # -if [ "$mode" = "-p" ]; then - sync_dist "$queue_dist_src" "$queue_dist_dst" --delete-after -fi +if [ "$script_only" -o "$mode" = "-p" ]; then -##fi -## + sync_dist "$dist_src" "$dist_dst" $rsync_del -if [ "$script_only" = true ]; then - exit 0 -fi + # Also sync (disable) queue. + # + if [ "$mode" = "-p" ]; then + sync_dist "$queue_dist_src" "$queue_dist_dst" --delete-after + fi -if [ "$mode" = "-p" ]; then exit 0 fi # Distribute packages, regenerate and sync the repository. # +# Note: $mode is either empty or -q (which implies -d). +# # These are just for testing (though libodb-mysql needs libmysqlclient). # @@ -319,7 +322,9 @@ etc/stage-pkg -c $mode -d odb \ ../odb/builds/default/libodb-boost \ ../odb/builds/default/libodb-qt -etc/stage-pkg -c $mode build2 \ +# Regenerate the repository (unless $mode is -q) but do not publish. +# +etc/stage-pkg -c $mode -g build2 \ libbutl \ libbutl.bash \ build2 \ @@ -337,3 +342,9 @@ etc/stage-pkg -c $mode build2 \ libbuild2-kconfig/kconfig-hello \ libbuild2-kconfig/libbuild2-kconfig \ libbuild2-kconfig/libbuild2-kconfig-tests + +sync_dist "$dist_src" "$dist_dst" $rsync_del + +if [ "$mode" != "-q" ]; then + etc/stage-pkg -p +fi -- cgit v1.1