diff --git a/.editorconfig b/.editorconfig index 16e49b0..8cf502a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,6 +12,9 @@ max_line_length = 120 [{*.py,*.yml}] indent_size = 4 +[*.sh] +switch_case_indent = true + # Ignore the entire ".venv" directory. [.venv/**] ignore = true diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 638e56e..12e5b1b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,12 +18,12 @@ shellcheck: - shellcheck $(find . -name '*.sh' | xargs) shfmt: - image: mvdan/shfmt:v3.1.0-alpine + image: mvdan/shfmt:v3.7.0-alpine stage: lint before_script: - shfmt -version script: - - shfmt -i 2 -ci -d . + - shfmt -d . .base: image: python:3.10 diff --git a/scripts/create_release_branch.sh b/scripts/create_release_branch.sh index a951587..eb25a87 100755 --- a/scripts/create_release_branch.sh +++ b/scripts/create_release_branch.sh @@ -30,29 +30,29 @@ dry_run=0 while [[ "$1" != "" ]]; do case $1 in - --dry-run) - dry_run=1 - ;; - --help | -h) - usage - exit 0 - ;; - *) - if [[ -z "${version}" ]]; then - input_version=$1 - validated_version=$(validate_version "${input_version}") - if [[ -z "${validated_version}" ]]; then - printf "%s: provided version is invalid.\n\n" "${input_version}" + --dry-run) + dry_run=1 + ;; + --help | -h) + usage + exit 0 + ;; + *) + if [[ -z "${version}" ]]; then + input_version=$1 + validated_version=$(validate_version "${input_version}") + if [[ -z "${validated_version}" ]]; then + printf "%s: provided version is invalid.\n\n" "${input_version}" + usage + exit 1 + fi + version="${validated_version}" + else + printf "%s: unrecognized argument.\n\n" "$1" usage exit 1 fi - version="${validated_version}" - else - printf "%s: unrecognized argument.\n\n" "$1" - usage - exit 1 - fi - ;; + ;; esac shift done diff --git a/scripts/tag_release.sh b/scripts/tag_release.sh index 368d0ca..d72dcf3 100755 --- a/scripts/tag_release.sh +++ b/scripts/tag_release.sh @@ -28,29 +28,29 @@ dry_run=0 while [[ "$1" != "" ]]; do case $1 in - --dry-run) - dry_run=1 - ;; - --help | -h) - usage - exit 0 - ;; - *) - if [[ -z "${version}" ]]; then - input_version=$1 - validated_version=$(validate_version "${input_version}") - if [[ -z "${validated_version}" ]]; then - printf "%s: provided version is invalid.\n\n" "${input_version}" + --dry-run) + dry_run=1 + ;; + --help | -h) + usage + exit 0 + ;; + *) + if [[ -z "${version}" ]]; then + input_version=$1 + validated_version=$(validate_version "${input_version}") + if [[ -z "${validated_version}" ]]; then + printf "%s: provided version is invalid.\n\n" "${input_version}" + usage + exit 1 + fi + version="${validated_version}" + else + printf "%s: unrecognized argument.\n\n" "$1" usage exit 1 fi - version="${validated_version}" - else - printf "%s: unrecognized argument.\n\n" "$1" - usage - exit 1 - fi - ;; + ;; esac shift done