Skip to content

Commit

Permalink
doc: add example script
Browse files Browse the repository at this point in the history
  • Loading branch information
adikari committed Oct 6, 2022
1 parent 4df4ff7 commit a1a29c8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,25 @@ Flags:
Use "safebox [command] --help" for more information about a command.
```

### Using in scripts

```
#!/bin/bash
set -euo pipefail
echo "📦 deploying configs to ssm"
yarn safebox deploy --stage $STAGE # ensures all configs are deployed. throws error if ay configs are missings
configs=$(yarn safebox export --stage $STAGE)
CONFIG1=$(echo "$configs" | jq -r ".CONFIG1")
CONFIG2=$(echo "$configs" | jq -r '.CONFIG2')
echo $CONFIG1
echo $CONFIG2
```

### License

Feel free to use the code, it's released using the MIT license.

0 comments on commit a1a29c8

Please sign in to comment.