-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow providing options to
bluebuild build
command (#63)
* feat: allow providing options to `bluebuild build` command * chore: wording changes * chore: wording changes, typo fix * fix: proper shebang, stricter script options --------- Co-authored-by: xyny <[email protected]>
- Loading branch information
Showing
2 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
# Expected env vars: | ||
# SQUASH_INPUT_VALUE | ||
# BUILD_OPTS | ||
|
||
if [ "$SQUASH_INPUT_VALUE" != "true" ]; then | ||
if grep -qE '(-B)|(--build-driver)' <<< "$BUILD_OPTS"; then | ||
echo 'Cannot provide --build-driver in build_opts while squash is set to true.' | ||
exit 1 | ||
fi | ||
|
||
if grep -qE '(-s)|(--squash)' <<< "$BUILD_OPTS"; then | ||
echo 'Cannot provide --squash in build_opts while squash is set to true.' | ||
exit 1 | ||
fi | ||
fi | ||
|
||
if grep -qE '(-p)|(--push)' <<< "$BUILD_OPTS"; then | ||
echo 'Please do not add --push to build_opts, as the action already provides that argument.' | ||
exit 1 | ||
fi | ||
|
||
exit 0 |