Make curl u param more dynamic (#13)
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Tyler Perkins 2022-12-16 21:26:18 -05:00 committed by GitHub
parent 453a4ab465
commit bd5df072a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -16,6 +16,10 @@ Message=${PLUGIN_MESSAGE:-Pipeline finished!}
Username=${PLUGIN_USERNAME:-}
Password=${PLUGIN_PASSWORD:-}
if [[ ! -z $Username ]] || [[ ! -z $Password ]]; then
UParam="-u $Username:$Password"
fi
if [[ ! -z $Priority ]]; then
Priority="-H Priority:$Priority"
fi
@ -40,5 +44,5 @@ if [[ ! -z $Icon ]]; then
Icon="-H Icon:$Icon"
fi
curl $Priority $Title $Tags $Click $Attach $Icon -u $Username:$Password -d "$Message" $URL/$Topic
#curl $Priority $Title $Tags $Click $Attach $Icon -u $Username:$Password -d "$Message" $URL/$Topic
curl $Priority $Title $Tags $Click $Attach $Icon $UParam -d "$Message" $URL/$Topic
#curl $Priority $Title $Tags $Click $Attach $Icon $UParam -d "$Message" $URL/$Topic