Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts/release: add sha256sum summary of release assets #11087

Merged
merged 1 commit into from
Aug 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,23 @@ main() {
./release/etcd-${RELEASE_VERSION}-$(go env GOOS)-amd64/etcd --version | grep -q "etcd Version: ${VERSION}" || true
./release/etcd-${RELEASE_VERSION}-$(go env GOOS)-amd64/etcdctl version | grep -q "etcdctl version: ${VERSION}" || true

# Generate SHA256SUM
echo -e "Generating sha256sum of release artifacts.\n"
ls ./release | grep -E '\.tar.gz$|\.zip$' | xargs shasum -a 256; > ./release/SHA256SUM
if [ -s ./release/SHA256SUM ]; then
cat ./release/SHA256SUM
else
echo "sha256sum is not valid. Aborting."
exit 1
fi

# Upload artifacts.
if [ "${NO_UPLOAD}" == 1 ]; then
echo "Skipping artifact upload to gs://etcd. --no-upload flat is set."
else
read -p "Upload etcd ${RELEASE_VERSION} release artifacts to gs://etcd [y/N]? " confirm
[[ "${confirm,,}" == "y" ]] || exit 1
gsutil -m cp ./release/SHA256SUM gs://etcd/${RELEASE_VERSION}/
gsutil -m cp ./release/*.zip gs://etcd/${RELEASE_VERSION}/
gsutil -m cp ./release/*.tar.gz gs://etcd/${RELEASE_VERSION}/
gsutil -m acl ch -u allUsers:R -r gs://etcd/${RELEASE_VERSION}/
Expand Down