Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
fix(update): Fix version detection in update (#177)
Browse files Browse the repository at this point in the history
Fixes our `awk` magic to "parse" JSON responses so it can work
both with and without newlines in responses. PIP does not
format its JSON output whereas GitHub does.
  • Loading branch information
BYK authored Jun 13, 2019
1 parent 7c14dad commit aac9761
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ usage () {
}

if [ "$#" = 0 ]; then
set -- "$(curl -sSL 'https://api.github.com/repos/getsentry/sentry/git/refs/heads/master' | awk -F '"' '$2 == "sha" { print $4 }')"
set -- "$(curl -sSL 'https://api.github.com/repos/getsentry/sentry/git/refs/heads/master' | awk 'BEGIN { RS=",|:{\n"; FS="\""; } $2 == "sha" { print $4 }')"
echo "No sha specified, using refs/head/master ($1)"
fi

Expand Down
2 changes: 1 addition & 1 deletion update.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

current="$(curl -sSL 'https://pypi.python.org/pypi/sentry/json' | awk -F '"' '$2 == "version" { print $4 }')"
current="$(curl -sSL 'https://pypi.python.org/pypi/sentry/json' | awk 'BEGIN { RS=",|:{\n"; FS="\""; } $2 == "version" { print $4 }')"

set -x
sed -ri 's/^(ENV SENTRY_VERSION) .*/\1 '"$current"'/' 9.1/Dockerfile

0 comments on commit aac9761

Please sign in to comment.