Browse Source

Fix shell script indentation as it's 4 spaces here (#576)

pull/579/head
Peter Dave Hello 4 years ago
committed by GitHub
parent
commit
0499f2dc56
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 36 deletions
  1. +3
    -0
      .editorconfig
  2. +18
    -18
      bin/build_web_extensions
  3. +18
    -18
      bin/build_web_site

+ 3
- 0
.editorconfig View File

@@ -18,3 +18,6 @@ trim_trailing_whitespace = false


[*.py] [*.py]
indent_size = 4 indent_size = 4

[bin/*]
indent_size = 4

+ 18
- 18
bin/build_web_extensions View File

@@ -4,7 +4,7 @@ RED='\033[0;31m'
NOCOLOR='\033[0m' NOCOLOR='\033[0m'


function print_error { function print_error {
echo -e "${RED}$1${NOCOLOR}"
echo -e "${RED}$1${NOCOLOR}"
} }


function check_current_directory_is_root { function check_current_directory_is_root {
@@ -66,23 +66,23 @@ function increment_version {
IFS='.' read -a versions <<< "${1}" IFS='.' read -a versions <<< "${1}"


major=${versions[0]} major=${versions[0]}
minor=${versions[1]}
patch=${versions[2]}
case "${2}" in
"major")
major=$((major + 1))
minor=0
patch=0
;;
"minor")
minor=$((minor + 1))
patch=0
;;
"patch")
patch=$((patch + 1))
;;
esac
minor=${versions[1]}
patch=${versions[2]}
case "${2}" in
"major")
major=$((major + 1))
minor=0
patch=0
;;
"minor")
minor=$((minor + 1))
patch=0
;;
"patch")
patch=$((patch + 1))
;;
esac


new_version="$major.$minor.$patch" new_version="$major.$minor.$patch"
echo ${new_version} echo ${new_version}


+ 18
- 18
bin/build_web_site View File

@@ -4,7 +4,7 @@ RED='\033[0;31m'
NOCOLOR='\033[0m' NOCOLOR='\033[0m'


function print_error { function print_error {
echo -e "${RED}$1${NOCOLOR}"
echo -e "${RED}$1${NOCOLOR}"
} }


function check_current_directory_is_root { function check_current_directory_is_root {
@@ -66,23 +66,23 @@ function increment_version {
IFS='.' read -a versions <<< "${1}" IFS='.' read -a versions <<< "${1}"


major=${versions[0]} major=${versions[0]}
minor=${versions[1]}
patch=${versions[2]}
case "${2}" in
"major")
major=$((major + 1))
minor=0
patch=0
;;
"minor")
minor=$((minor + 1))
patch=0
;;
"patch")
patch=$((patch + 1))
;;
esac
minor=${versions[1]}
patch=${versions[2]}
case "${2}" in
"major")
major=$((major + 1))
minor=0
patch=0
;;
"minor")
minor=$((minor + 1))
patch=0
;;
"patch")
patch=$((patch + 1))
;;
esac


new_version="$major.$minor.$patch" new_version="$major.$minor.$patch"
echo ${new_version} echo ${new_version}


Loading…
Cancel
Save