Skip to content

Commit ac87b4a

Browse files
authored
Merge pull request #9008 from sylvestre/publish
publish script: add progress
2 parents 0825864 + a8db3a4 commit ac87b4a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

util/publish.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,15 @@ TOTAL_ORDER=${TOTAL_ORDER#ROOT}
5353
CRATE_VERSION=$(grep '^version =' Cargo.toml | head -n1 | cut -d '"' -f2)
5454

5555
set -e
56-
for dir in src/uucore_procs/ src/uucore/ src/uu/stdbuf/src/libstdbuf/ tests/uutests/ fuzz/uufuzz/; do
56+
CORE_DIRS="src/uucore_procs/ src/uucore/ src/uu/stdbuf/src/libstdbuf/ tests/uutests/ fuzz/uufuzz/"
57+
CORE_COUNT=$(echo $CORE_DIRS | wc -w)
58+
UTIL_COUNT=$(echo $TOTAL_ORDER | wc -w)
59+
TOTAL_COUNT=$((CORE_COUNT + UTIL_COUNT + 1))
60+
CURRENT=0
61+
62+
for dir in $CORE_DIRS; do
63+
CURRENT=$((CURRENT + 1))
64+
echo "[$CURRENT/$TOTAL_COUNT] Processing: $dir"
5765
(
5866
cd "$dir"
5967
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
6876
done
6977

7078
for p in $TOTAL_ORDER; do
79+
CURRENT=$((CURRENT + 1))
80+
echo "[$CURRENT/$TOTAL_COUNT] Processing: $p"
7181
(
7282
cd "src/uu/$p"
7383
CRATE_NAME=$(grep '^name =' "Cargo.toml" | head -n1 | cut -d '"' -f2)
@@ -80,5 +90,7 @@ for p in $TOTAL_ORDER; do
8090
)
8191
done
8292

93+
CURRENT=$((CURRENT + 1))
94+
echo "[$CURRENT/$TOTAL_COUNT] Processing: main coreutils crate"
8395
#shellcheck disable=SC2086
8496
cargo publish $ARG

0 commit comments

Comments
 (0)