Skip to content

Commit

Permalink
Fix head invocation on older distros
Browse files Browse the repository at this point in the history
  • Loading branch information
majorz committed Oct 18, 2017
1 parent 2818679 commit 8293d48
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ main() {
local _upload_url

# Grab latest release notes from the Changelog

_body=$(ensure cat CHANGELOG.md | grep -Pzo '##.*\n\n\K\X*?(?=\n##|$)' | head -n1 -z | tr '\0' '\n')
_body=$(
ensure cat CHANGELOG.md \
| ensure grep -Pzo '##.*\n\n\K\X*?(?=\n##|$)' \
| ensure tr '\0' '\n' \
| ensure head -n1
)

_payload=$(
jq --null-input \
Expand All @@ -81,7 +85,11 @@ main() {
-d "$_payload"
)

_upload_url=$(echo "$_response" | jq -r .upload_url | sed -e "s/{?name,label}//")
_upload_url=$(
echo "$_response" \
| ensure jq -r .upload_url \
| ensure sed -e "s/{?name,label}//"
)

for _file in /tmp/artifacts/*; do
local _basename
Expand Down

0 comments on commit 8293d48

Please sign in to comment.