Skip to content

Commit 86296b1

Browse files
authored
Use correct bash syntax for checking if a parameter exists and is true (#15)
* Make scripts executable * Correct syntax of boolean checks * Update example
1 parent 9169ff0 commit 86296b1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/examples/example.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: >
55
usage:
66
version: 2.1
77
orbs:
8-
qlty: qltysh/qlty-orb@0.0.3
8+
qlty: qltysh/qlty-orb@volatile
99
jobs:
1010
run_tests_and_publish_coverage:
1111
docker:

src/scripts/install

100644100755
File mode changed.

src/scripts/publish

100644100755
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ add_param "--add-prefix" "$PARAM_ADD_PREFIX"
2525
add_param "--total-parts-count" "$PARAM_TOTAL_PARTS_COUNT"
2626
add_param "--format" "$PARAM_FORMAT"
2727

28-
if $PARAM_VERBOSE; then
28+
if [ "$PARAM_VERBOSE" = "true" ]; then
2929
params+=("--verbose")
3030
fi
3131

32-
if $PARAM_SKIP_MISSING_FILES; then
32+
if [ "$PARAM_SKIP_MISSING_FILES" = "true" ]; then
3333
params+=("--skip-missing-files")
3434
fi
3535

36-
if $PARAM_DRY_RUN; then
36+
if [ "$PARAM_DRY_RUN" = "true" ]; then
3737
params+=("--dry-run")
3838
fi
3939

40-
if $PARAM_INCOMPLETE; then
40+
if [ "$PARAM_INCOMPLETE" = "true" ]; then
4141
params+=("--incomplete")
4242
fi
4343

@@ -46,7 +46,7 @@ if [[ -n $PARAM_UPLOAD_NAME ]]; then
4646
params+=("$PARAM_UPLOAD_NAME")
4747
fi
4848

49-
if $PARAM_VALIDATE; then
49+
if [ "$PARAM_VALIDATE" = "true" ]; then
5050
params+=("--validate")
5151

5252
if [[ -n $PARAM_VALIDATE_FILE_THRESHOLD ]]; then

0 commit comments

Comments
 (0)