2019-06-13 16:50:47 -06:00
|
|
|
#! /bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
if [ "$#" -eq 0 ]; then
|
|
|
|
echo "usage: <target branch> [<target branch> ...]"
|
|
|
|
echo ""
|
|
|
|
echo "example: release.sh dev.boringcrypto.go1.11 dev.boringcrypto.go1.12"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-02-26 09:59:05 -07:00
|
|
|
# Check that the Docker daemon is available.
|
|
|
|
docker ps > /dev/null
|
|
|
|
|
2019-06-13 16:50:47 -06:00
|
|
|
WORKTREE="$(mktemp -d)"
|
|
|
|
BRANCH="boring/release-$(date +%Y%m%d%H%M%S)"
|
|
|
|
|
|
|
|
git fetch
|
|
|
|
git worktree add --track -b "$BRANCH" "$WORKTREE" origin/dev.boringcrypto
|
|
|
|
|
|
|
|
cd "$WORKTREE/src"
|
|
|
|
./make.bash
|
|
|
|
|
|
|
|
cd ../misc/boring
|
|
|
|
for branch in "$@"; do
|
|
|
|
./build.release "origin/$branch"
|
2019-10-11 12:36:39 -06:00
|
|
|
./build.docker
|
2019-06-13 16:50:47 -06:00
|
|
|
done
|
|
|
|
|
|
|
|
git add RELEASES
|
|
|
|
git commit -m "misc/boring: add new releases to RELEASES file"
|
2020-02-05 12:36:25 -07:00
|
|
|
git codereview mail -r katie@golang.org,filippo@golang.org
|
2019-06-13 16:50:47 -06:00
|
|
|
|
|
|
|
rm *.tar.gz
|
|
|
|
cd - && git worktree remove "$WORKTREE"
|