Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harding against special charts in path #9

Merged
merged 1 commit into from
Apr 26, 2020
Merged

Harding against special charts in path #9

merged 1 commit into from
Apr 26, 2020

Conversation

jkroepke
Copy link
Owner

@jkroepke jkroepke commented Apr 26, 2020

Add tests for special paths in secret.yaml paths like ()!\e@

@github-actions
Copy link
Contributor

sh-checker report

shellcheck output
No errors or shellcheck is disabled

The files above have some shellcheck issues

shfmt output
--- contrib/release.sh.orig
+++ contrib/release.sh
@@ -1,41 +1,41 @@
 #!/usr/bin/env bash
 
 sedi() {
-	if [ "$(uname)" = "Darwin" ]; then
-		sed -i "" "$@"
-	else
-		sed -i "$@"
-	fi
+    if [ "$(uname)" = "Darwin" ]; then
+        sed -i "" "$@"
+    else
+        sed -i "$@"
+    fi
 }
 
 if [ $# -lt 2 ] || [[ ! "${1}" =~ ^[0-9]\.[0-9]\.[0-9]$ ]] || [[ ! "${2}" =~ ^[0-9]\.[0-9]\.[0-9]$ ]]; then
-	echo "Missing arguments."
-	echo "$0 1.1.0 1.2.0"
-	exit 1
+    echo "Missing arguments."
+    echo "$0 1.1.0 1.2.0"
+    exit 1
 fi
 
 BRANCH=$(git rev-parse --abbrev-ref HEAD)
 if [[ "$BRANCH" != "master" ]]; then
-	echo "Please checkout master"
-	exit 1
+    echo "Please checkout master"
+    exit 1
 fi
 
 # https://stackoverflow.com/a/3278427/8087167
 UPSTREAM='@{u}'
 LOCAL=$(git rev-parse @)
 REMOTE=$(git rev-parse "$UPSTREAM")
 
 if [ "$LOCAL" != "$REMOTE" ]; then
-	echo "Current branch is no up to date with origin. Please pull or push"
-	exit 1
+    echo "Current branch is no up to date with origin. Please pull or push"
+    exit 1
 fi
 
 sedi "s/version:.*/version: \"${1}\"/" "$(git rev-parse --show-toplevel)/plugin.yaml"
 git commit -am "Release v${1}"
 git tag --annotate -m "Release v${1}" "v${1}"
 
 sedi "s/version:.*/version: \"${2}-master\"/" "$(git rev-parse --show-toplevel)/plugin.yaml"
 git commit -am "Set next version"
 
 git push --follow-tags --atomic
 

The files above have some formatting problems, you can use shfmt -w to fix them

@jkroepke jkroepke merged commit 9817553 into master Apr 26, 2020
@jkroepke jkroepke deleted the special-paths branch April 26, 2020 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant