commit | c4d44a075e0d510da9717fdcad66d6c9e8f2b2b3 | [log] [tgz] |
---|---|---|
author | Gary Miguel <garymm@google.com> | Fri Jun 19 17:08:27 2020 -0700 |
committer | Gary Miguel <garymm@google.com> | Fri Jun 19 17:08:51 2020 -0700 |
tree | 28d4ef9ad0a0b21f831c0aff7029d633ea364d92 | |
parent | fa17ee3892ec689f26ee129aff1b813bfb537ff9 [diff] |
update instructions to mention GCE VM trick Bug: 53031 Change-Id: I5d4dc946d8bab5a8533582c6750cc32837572c66
This contains configuration useful in updating the black package in CIPD.
We want this to run in the following environments:
At time of writing, binaries built on gLinux did not work on our GCE Swarming bots. In order to work on both GCE and gLinux workstations, I found that the following procedure works when run from a GCE VM that is using the same image as our swarming bots. You can ask the foundation infra team how to create a VM for this if you don't know how.
In order to produce a binary that works on MacOS, I ran these commands on MacOS.
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