build: update bootstrap script
This commit is contained in:
parent
74a8bef475
commit
7fc1d4db70
1 changed files with 8 additions and 0 deletions
|
|
@ -1,7 +1,11 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
cargo build
|
cargo build
|
||||||
|
|
||||||
|
BREWLOG_TOKEN="$(./target/debug/brewlog create-token --name "bootstrap-token" --username admin --password password | grep -Po "BREWLOG_TOKEN=\K.+$")"
|
||||||
|
export BREWLOG_TOKEN
|
||||||
|
|
||||||
if [[ -z "$BREWLOG_TOKEN" ]]; then
|
if [[ -z "$BREWLOG_TOKEN" ]]; then
|
||||||
echo "Error: BREWLOG_TOKEN environment variable is not set."
|
echo "Error: BREWLOG_TOKEN environment variable is not set."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -410,3 +414,7 @@ fi
|
||||||
--producer "Simbi Co-op" \
|
--producer "Simbi Co-op" \
|
||||||
--process "Washed" \
|
--process "Washed" \
|
||||||
--tasting-notes "Black Tea, Orange, Cane Sugar"
|
--tasting-notes "Black Tea, Orange, Cane Sugar"
|
||||||
|
|
||||||
|
echo "Bootstrapped database"
|
||||||
|
echo
|
||||||
|
echo "Set token $BREWLOG_TOKEN to use the data added here."
|
||||||
Loading…
Reference in a new issue