This contains configuration useful in updating the black package in CIPD.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install pyoxidizer
BLACK_VERSION=$(pip3 install black== 2>&1 | grep versions: | sed -E 's/.*, ([a-z0-9\.]+)\)/\1/') # We have to specify a back-up to make this work on both Linux and MacOS: # https://stackoverflow.com/questions/5694228/sed-in-place-flag-that-works-both-on-mac-bsd-and-linux sed -E -e "s/black==[^\"]+\"/black==${BLACK_VERSION}\"/" -i.bak ./pyoxidizer.bzl rm ./pyoxidizer.bzl.bak pyoxidizer build install OS=$(if [[ $(uname) == 'Darwin' ]]; then echo 'mac'; else echo 'linux'; fi) cipd create -tag version:${BLACK_VERSION} -pkg-def ./cipd-${OS}.yaml