vagrant/scripts/sign.sh

30 lines
694 B
Bash
Raw Normal View History

2013-12-06 18:29:38 -05:00
#!/bin/bash
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
2013-12-06 18:29:38 -05:00
set -e
# Get the parent directory of where this script is.
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
# Change into that dir because we expect that
cd $DIR
# Get the version from the command line
VERSION=$1
if [ -z $VERSION ]; then
echo "Please specify a version."
exit 1
fi
2015-10-22 12:18:43 -04:00
# Make the checksums
pushd ./pkg/dist
shasum -a256 * > ./vagrant_${VERSION}_SHA256SUMS
2022-08-04 18:57:30 -04:00
# if [ -z $NOSIGN ]; then
# echo "==> Signing..."
# gpg --default-key 348FFC4C --detach-sig ./vagrant_${VERSION}_SHA256SUMS
# fi
2013-12-09 03:17:14 -05:00
popd