diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-05 14:26:14 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-05 14:26:14 +0200 |
commit | b22f2f86d4a7166b7098fc82944a198e6ad63748 (patch) | |
tree | 5e52471866323e253d3d53a07a24710ccc8273d6 /publish | |
parent | 56c433b914d65ccf9b9c53a78562452475353e8d (diff) |
Updates for 0.5.0 release0.5.0
Diffstat (limited to 'publish')
-rwxr-xr-x | publish | 21 |
1 files changed, 9 insertions, 12 deletions
@@ -2,7 +2,7 @@ # Publish build2 to build2.org/cppget.org (and brep.cppget.org). # -# The distribution is taken from staging/0/ and packages from +# The distribution is taken from cppget.org/0/ and packages from # cppget.org/repository/. # # Usage: publish [<rsync-options>] @@ -16,24 +16,21 @@ set -o errtrace # Trap in functions. function info () { echo "$*" 1>&2; } function error () { info "$*"; exit 1; } -v="$(cat build2-toolchain/version)" -vm="$(echo $v | sed -e 's/^\(.*\)\.\(.*\)\..*$/\1.\2/')" # X.Y +v="$(sed -n -re 's/^version: ([^.]+\.[^.]+\.[^-]+(-[ab]\.[^.+]+)?).*$/\1/p' build2-toolchain/manifest)" -if [ -z "$v" -o -z "$vm" ]; then - error "unable to extract version from `cat build2-toolchain/version`" -fi - -d="staging/0/$v" - -if [ ! -d "$d" ]; then - error "distribution directory $d does not exist" +if [ -z "$v" ]; then + error "unable to extract version build2-toolchain/manifest" fi function sync () { info "build2.org:" + + rsync -v -rlpt -c --copy-unsafe-links --prune-empty-dirs --delete-after \ +"${@}" "cppget.org/0/$v/" "build2.org:/var/www/download.build2.org/public/$v/" + rsync -v -rlpt -c --copy-unsafe-links --prune-empty-dirs --delete-after \ -"${@}" "$d/" "build2.org:/var/www/download.build2.org/public/$vm/" +"${@}" "cppget.org/0/toolchain.sha256" "build2.org:/var/www/download.build2.org/public/" info "cppget.org:" etc/rep-publish cppget.org/repository/1/ cppget.org:/var/bpkg/1/ "${@}" |