From 502cfdd1ef8dd7d422c721efc39f6ade98fb31a4 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Fri, 12 Jan 2024 21:28:57 +0100 Subject: [PATCH] Add editorconfig and fix issues --- .ecrc | 6 ++++++ .editorconfig | 16 ++++++++++++++++ plugin.sh | 6 +++--- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .ecrc create mode 100644 .editorconfig diff --git a/.ecrc b/.ecrc new file mode 100644 index 0000000..bce93d2 --- /dev/null +++ b/.ecrc @@ -0,0 +1,6 @@ +{ + "Exclude": [ + ".git", + "LICENSE" + ] +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..47c5c7c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +tab_width = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[Makefile] +indent_style = tab diff --git a/plugin.sh b/plugin.sh index 08a2981..0d3e371 100755 --- a/plugin.sh +++ b/plugin.sh @@ -75,13 +75,13 @@ if [[ "${PLUGIN_AUTO_TAG:-}" == "true" ]]; then major=$(echo "${TAG}" |awk -F'.' '{print $1}') minor=$(echo "${TAG}" |awk -F'.' '{print $2}') release=$(echo "${TAG}" |awk -F'.' '{print $3}') - + major=${major:-0} minor=${minor:-0} release=${release:-0} - + echo "${major},${major}.${minor},${major}.${minor}.${release},latest" > .tags - fi + fi fi if [ -n "${PLUGIN_MIRRORS:-}" ]; then