summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xstage37
1 files changed, 22 insertions, 15 deletions
diff --git a/stage b/stage
index ecca993..a9eb44a 100755
--- a/stage
+++ b/stage
@@ -1,11 +1,9 @@
#! /usr/bin/env bash
-# Stage (or queue) build2 packages and distributions.
+# Stage or queue build2 packages and distributions.
#
-# -t
-# Toolchain only, no brep.
# -p
-# packages only, no baseutils/mingw.
+# Packages only, no baseutils/mingw.
# -q
# Put packages into the queue instead of staging (distributions still go to
# staging).
@@ -22,14 +20,12 @@ function info () { echo "$*" 1>&2; }
function error () { info "$*"; exit 1; }
v="$(cat build2-toolchain/version)"
-vf="$(echo $v | sed -e 's/^\(.*\)\.\(.*\)\.\([^-]*\).*$/\1.\2.\3/')" # Final.
+vf="$(echo $v | sed -re 's/^([^.]*)\.([^.]*)\.([^-]*).*$/\1.\2.\3/')" # Final.
if [ -z "$v" -o -z "$vf" ]; then
- error "unable to extract version from `cat build2-toolchain/version`"
+ error "unable to extract version from build2-toolchain/version"
fi
-toolchain="libbutl build2 libbpkg bpkg"
-extras="brep"
base="y"
repo_name="STAGE.BUILD2.ORG"
@@ -39,10 +35,6 @@ repo_host2=
while [ $# -gt 0 ]; do
case $1 in
- -t)
- extras=
- shift
- ;;
-p)
base=n
shift
@@ -60,8 +52,6 @@ while [ $# -gt 0 ]; do
esac
done
-tools="$toolchain $extras"
-
mkdir -p "staging/0/$v"
# Generate baseutils if requested.
@@ -102,6 +92,8 @@ if [ "$base" = "y" ]; then
mv "/tmp/build2-mingw-$v-x86_64-windows.tar.xz.sha256" "staging/0/$v/"
fi
+mkdir -p /tmp/dist
+
# Dist build2-toolchain.
#
# @@ .sha256 sums: make sure they don't contain full paths!
@@ -114,6 +106,22 @@ sha256sum -b "build2-toolchain-$v.tar.gz" >"build2-toolchain-$v.tar.gz.sha256"
sha256sum -b "build2-toolchain-$v.tar.xz" >"build2-toolchain-$v.tar.xz.sha256"
cd "$owd"
+# Prepare the toolchain.sha256 checksums file.
+#
+function checksum_line () # <file>
+{
+ local s
+ s="$(sed -n -re 's/^([^ ]+) .+$/\1/p' "staging/0/$v/$1.sha256")"
+ echo "$s *$v/$1" >>"staging/0/toolchain.sha256"
+}
+
+echo "# $v" >"staging/0/toolchain.sha256"
+checksum_line "build2-toolchain-$v.tar.xz" # Must be first.
+checksum_line "build2-baseutils-$v-x86_64-windows.zip"
+#checksum_line "build2-mingw-$v-x86_64-windows.tar.xz"
+#checksum_line "build2-baseutils-$v-i686-windows.zip"
+#checksum_line "build2-mingw-$v-i686-windows.tar.xz"
+
# Dist individual packages into the repository.
#
function dist() # <dir> <category>
@@ -152,7 +160,6 @@ dist brep build2
info "Insert $repo_name signing key and press Enter"
read
etc/rep-update "$repo_dir/" \
- --openssl openssl-1.0.2 \
--openssl-option -engine --openssl-option pkcs11 \
--openssl-option -keyform --openssl-option engine \
--key "label_SIGN key"