Commit 80de68ef authored by Pierre SMEYERS's avatar Pierre SMEYERS
Browse files

Merge branch '1-change-variable-behaviour' into 'master'

feat: Change boolean variable behaviour

Closes #1

See merge request to-be-continuous/bash!1
parents a925c722 803eac3d
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ This job performs a static analysis of your shell scripts using [ShellCheck](htt

| Name                    | description                            | default value     |
| ----------------------- | -------------------------------------- | ----------------- |
| `BASH_SHELLCHECK_DISABLED` | Set to disable ShellCheck                                                | _none_ (enabled) |
| `BASH_SHELLCHECK_DISABLED` | Set to `true` to disable ShellCheck                                                | _none_ (enabled) |
| `BASH_SHELLCHECK_IMAGE` | The Docker image used to run [ShellCheck](https://github.com/koalaman/shellcheck) | `koalaman/shellcheck-alpine:stable` |
| `BASH_SHELLCHECK_FILES` | Shell file(s) pattern to analyse                                                  | `**/*.sh`            |
| `BASH_SHELLCHECK_OPTS`  | ShellCheck [options](https://github.com/koalaman/shellcheck/blob/master/shellcheck.1.md) | _none_ |
@@ -34,7 +34,7 @@ The job uses the following variables:

| Name                    | description                            | default value     |
| ----------------------- | -------------------------------------- | ----------------- |
| `BASH_BATS_ENABLED`     | Set to enable bats tests                                                    | _none_ (disabled) |
| `BASH_BATS_ENABLED`     | Set to `true` to enable bats tests                                                    | _none_ (disabled) |
| `BASH_BATS_IMAGE`       | The Docker image used to run [Bats](https://github.com/bats-core/bats-core) | `bats/bats:1.2.1` |
| `BASH_BATS_TESTS`       | The path to a Bats test file, or the path to a directory containing Bats test files | `tests`           |
| `BASH_BATS_OPTS`        | Bats [options](https://github.com/bats-core/bats-core#usage)                | `--formatter junit --output reports` |
+3 −3
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ stages:
    fi
  }

  if [[ -z "$TEMPLATE_CHECK_UPDATE_DISABLED" ]]; then check_for_update bash "1.1.0"; fi
  if [[ "$TEMPLATE_CHECK_UPDATE_DISABLED" != "true" ]]; then check_for_update bash "1.1.0"; fi
  unscope_variables

  # ENDSCRIPT
@@ -223,7 +223,7 @@ bash-shellcheck:
  rules:
    - if: '$CI_MERGE_REQUEST_ID'
      when: never
    - if: '$BASH_SHELLCHECK_DISABLED'
    - if: '$BASH_SHELLCHECK_DISABLED == "true"'
      when: never
    - if: $CI_COMMIT_REF_NAME # useless but prevents GitLab from warning
      when: on_success
@@ -249,6 +249,6 @@ bash-bats:
  rules:
    - if: '$CI_MERGE_REQUEST_ID'
      when: never
    - if: $BASH_BATS_ENABLED
    - if: '$BASH_BATS_ENABLED == "true"'
      when: on_success