Add nonces

This commit is contained in:
Simon Warta 2020-02-06 08:59:22 +01:00
parent 7320bcec3b
commit a1322fe9d5
4 changed files with 17 additions and 0 deletions

View File

View File

View File

17
scripts/add_nonces.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
command -v shellcheck > /dev/null && shellcheck "$0"
# This must be called from repo root as current directory
NONCE=$(date +%s)
for packagedir in ./packages/*; do
if [[ -d "$packagedir" ]]; then
mkdir -p "$packagedir/nonces"
echo "Directory used to trigger lerna package updates for all packages" \
> "$packagedir/nonces/README.txt"
touch "$packagedir/nonces/$NONCE"
echo "Added nonce to package $packagedir"
fi
done