2022-02-01 06:55:11 +00:00
|
|
|
#!/bin/sh
|
2023-06-04 09:27:50 +00:00
|
|
|
# spell-checker:ignore uuhelp
|
|
|
|
|
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
|
2023-10-15 12:24:05 +00:00
|
|
|
# 5) git commit -m "New release" (make sure it includes Cargo.lock)
|
2023-06-01 06:25:03 +00:00
|
|
|
# 6) Run util/publish.sh in dry mode (it will fail as packages needs more recent version of uucore)
|
|
|
|
# 7) Run util/publish.sh --do-it
|
|
|
|
# 8) In some cases, you might have to fix dependencies and run import
|
2023-10-15 12:24:05 +00:00
|
|
|
# 9) Tag the release - "git tag 0.0.X && git push --tags"
|
|
|
|
# 10) Create the release on github https://github.com/uutils/coreutils/releases/new
|
|
|
|
# 11) Make sure we have good release notes
|
2021-03-07 10:04:43 +00:00
|
|
|
|
2023-12-30 19:17:23 +00:00
|
|
|
FROM="0.0.23"
|
|
|
|
TO="0.0.24"
|
2021-07-11 18:59:29 +00:00
|
|
|
|
2022-10-11 20:58:04 +00:00
|
|
|
PROGS=$(ls -1d src/uu/*/Cargo.toml src/uu/stdbuf/src/libstdbuf/Cargo.toml src/uucore/Cargo.toml 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
|
2022-08-20 10:14:14 +00:00
|
|
|
sed -i -e "s|version = \"$FROM\"|version = \"$TO\"|" src/uucore_procs/Cargo.toml
|
2021-07-11 18:59:29 +00:00
|
|
|
|
2023-06-01 19:12:29 +00:00
|
|
|
# Update uuhelp_parser
|
|
|
|
sed -i -e "s|version = \"$FROM\"|version = \"$TO\"|" src/uuhelp_parser/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
|
|
|
|
|
2022-08-20 11:24:06 +00:00
|
|
|
# Update the base32 dependency for basenc and base64
|
2022-10-11 21:02:51 +00:00
|
|
|
sed -i -e "s|uu_base32 = { version=\">=$FROM\"|uu_base32 = { version=\">=$TO\"|" src/uu/base64/Cargo.toml src/uu/basenc/Cargo.toml
|
2022-08-20 10:27:53 +00:00
|
|
|
|
2022-08-20 10:27:18 +00:00
|
|
|
# Update the ls dependency for dir and vdir
|
|
|
|
sed -i -e "s|uu_ls = { version = \">=$FROM\"|uu_ls = { version = \">=$TO\"|" src/uu/dir/Cargo.toml src/uu/vdir/Cargo.toml
|
|
|
|
|
2021-03-07 10:04:43 +00:00
|
|
|
# Update uucore itself
|
2022-08-20 10:14:14 +00:00
|
|
|
sed -i -e "s|version = \"$FROM\"|version = \"$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
|
2022-08-20 10:14:14 +00:00
|
|
|
sed -i -e "s|uucore = { version=\">=$FROM\",|uucore = { version=\">=$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
|
2022-08-20 10:14:14 +00:00
|
|
|
sed -i -e "s|uucore_procs = { version=\">=$FROM\",|uucore_procs = { version=\">=$TO\",|" $PROGS
|