publish script: add progress

This commit is contained in:
Sylvestre Ledru
2025-10-25 10:26:19 +02:00
parent 686127c034
commit a8db3a4633
+13 -1
View File
@@ -53,7 +53,15 @@ TOTAL_ORDER=${TOTAL_ORDER#ROOT}
CRATE_VERSION=$(grep '^version =' Cargo.toml | head -n1 | cut -d '"' -f2)
set -e
for dir in src/uucore_procs/ src/uucore/ src/uu/stdbuf/src/libstdbuf/ tests/uutests/ fuzz/uufuzz/; do
CORE_DIRS="src/uucore_procs/ src/uucore/ src/uu/stdbuf/src/libstdbuf/ tests/uutests/ fuzz/uufuzz/"
CORE_COUNT=$(echo $CORE_DIRS | wc -w)
UTIL_COUNT=$(echo $TOTAL_ORDER | wc -w)
TOTAL_COUNT=$((CORE_COUNT + UTIL_COUNT + 1))
CURRENT=0
for dir in $CORE_DIRS; do
CURRENT=$((CURRENT + 1))
echo "[$CURRENT/$TOTAL_COUNT] Processing: $dir"
(
cd "$dir"
CRATE_NAME=$(grep '^name =' "Cargo.toml" | head -n1 | cut -d '"' -f2)
@@ -68,6 +76,8 @@ for dir in src/uucore_procs/ src/uucore/ src/uu/stdbuf/src/libstdbuf/ tests/uute
done
for p in $TOTAL_ORDER; do
CURRENT=$((CURRENT + 1))
echo "[$CURRENT/$TOTAL_COUNT] Processing: $p"
(
cd "src/uu/$p"
CRATE_NAME=$(grep '^name =' "Cargo.toml" | head -n1 | cut -d '"' -f2)
@@ -80,5 +90,7 @@ for p in $TOTAL_ORDER; do
)
done
CURRENT=$((CURRENT + 1))
echo "[$CURRENT/$TOTAL_COUNT] Processing: main coreutils crate"
#shellcheck disable=SC2086
cargo publish $ARG