2022-02-01 06:55:11 +00:00
|
|
|
#!/bin/sh
|
2021-03-07 10:04:43 +00:00
|
|
|
# This is a stupid helper. I will mass replace all versions (including other crates)
|
|
|
|
# So, it should be triple-checked
|
|
|
|
|
2022-01-16 16:04:31 +00:00
|
|
|
# How to ship a new release:
|
|
|
|
# 1) update this script
|
2022-02-01 06:55:11 +00:00
|
|
|
# 2) run it: sh util/update-version.sh
|
2022-01-16 16:04:31 +00:00
|
|
|
# 3) Do a spot check with "git diff"
|
|
|
|
# 4) cargo test --release --features unix
|
2022-01-16 18:00:32 +00:00
|
|
|
# 5) Run util/publish.sh in dry mode (it will fail as packages needs more recent version of uucore)
|
|
|
|
# 6) Run util/publish.sh --do-it
|
|
|
|
# 7) In some cases, you might have to fix dependencies and run import
|
2021-03-07 10:04:43 +00:00
|
|
|
|
2022-05-22 17:57:19 +00:00
|
|
|
FROM="0.0.13"
|
|
|
|
TO="0.0.14"
|
2021-07-11 18:59:29 +00:00
|
|
|
|
2022-05-22 17:57:19 +00:00
|
|
|
UUCORE_PROCS_FROM="0.0.13"
|
|
|
|
UUCORE_PROCS_TO="0.0.14"
|
2022-01-16 16:04:43 +00:00
|
|
|
|
2022-05-22 17:57:19 +00:00
|
|
|
UUCORE_FROM="0.0.13"
|
|
|
|
UUCORE_TO="0.0.14"
|
2021-03-07 10:04:43 +00:00
|
|
|
|
2021-07-11 16:03:11 +00:00
|
|
|
PROGS=$(ls -1d src/uu/*/Cargo.toml src/uu/stdbuf/src/libstdbuf/Cargo.toml Cargo.toml src/uu/base64/Cargo.toml)
|
2021-03-07 10:04:43 +00:00
|
|
|
|
|
|
|
# update the version of all programs
|
2022-02-01 06:55:11 +00:00
|
|
|
#shellcheck disable=SC2086
|
2021-03-07 10:04:43 +00:00
|
|
|
sed -i -e "s|version = \"$FROM\"|version = \"$TO\"|" $PROGS
|
|
|
|
|
2021-07-11 18:59:29 +00:00
|
|
|
# Update uucore_procs
|
|
|
|
sed -i -e "s|version = \"$UUCORE_PROCS_FROM\"|version = \"$UUCORE_PROCS_TO\"|" src/uucore_procs/Cargo.toml
|
|
|
|
|
2021-05-31 02:57:20 +00:00
|
|
|
# Update the stdbuf stuff
|
2021-03-07 10:04:43 +00:00
|
|
|
sed -i -e "s|libstdbuf = { version=\"$FROM\"|libstdbuf = { version=\"$TO\"|" src/uu/stdbuf/Cargo.toml
|
|
|
|
sed -i -e "s|= { optional=true, version=\"$FROM\", package=\"uu_|= { optional=true, version=\"$TO\", package=\"uu_|g" Cargo.toml
|
|
|
|
|
|
|
|
# Update uucore itself
|
2021-07-11 16:03:08 +00:00
|
|
|
sed -i -e "s|version = \"$UUCORE_FROM\"|version = \"$UUCORE_TO\"|" src/uucore/Cargo.toml
|
2021-03-07 10:04:43 +00:00
|
|
|
# Update crates using uucore
|
2022-02-01 06:55:11 +00:00
|
|
|
#shellcheck disable=SC2086
|
2021-07-11 16:03:08 +00:00
|
|
|
sed -i -e "s|uucore = { version=\">=$UUCORE_FROM\",|uucore = { version=\">=$UUCORE_TO\",|" $PROGS
|
2021-07-11 18:59:29 +00:00
|
|
|
# Update crates using uucore_procs
|
2022-02-01 06:55:11 +00:00
|
|
|
#shellcheck disable=SC2086
|
2021-07-11 18:59:29 +00:00
|
|
|
sed -i -e "s|uucore_procs = { version=\">=$UUCORE_PROCS_FROM\",|uucore_procs = { version=\">=$UUCORE_PROCS_TO\",|" $PROGS
|