Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion util/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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
Loading