Commit 3998e88
authored
fix(scripts): detect failures in
## Overview
`publish_bottlecap_sandbox.sh` would print
```
DONE: Published version of layer ...
```
even when the `aws-vault`/`aws` call failed, because pipeline failures
were not propagated and `NEW_VERSION` was silently empty.
Changes:
- Replace `set -e` with `set -eo pipefail` so any failure in the
`aws-vault | jq` pipeline aborts the script immediately
- Add explicit validation: if `NEW_VERSION` is empty or `null` after the
publish call, print `ERROR:` and exit 1 instead of a misleading success
message
- Fix unquoted `$ARCHITECTURE`, `$REGION` variables (shellcheck
warnings)
## Testing
Verified locally by running the script without `aws` in `$PATH` — the
script now exits with `ERROR: Failed to publish layer ...` instead of
`DONE: Published version of layer ...`.publish_bottlecap_sandbox.sh (#1191)1 parent 8de97e0 commit 3998e88
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
0 commit comments