Black package

This contains configuration useful in updating the black package in CIPD.

Build and upload a new version

  1. (one time) Install Rust: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. (one time) Install PyOxidizer: cargo install pyoxidizer
  3. Build and upload latest version
BLACK_VERSION=$(pip3 install black== 2>&1 | grep versions: | sed -E 's/.*, ([a-z0-9\.]+)\)/\1/')
sed -E -e "s/black==[^\"]+\"/black==${BLACK_VERSION}\"/" -i '' ./pyoxidizer.bzl
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