From e8296275e37ad59ec02cfad31379b16f5461d2c5 Mon Sep 17 00:00:00 2001 From: Tobias Grieger Date: Thu, 16 Mar 2023 12:39:38 +0100 Subject: [PATCH] scripts: use pprofme for pprof-post They've changed their endpoints and the script no longer works. But they now have a `cli`. Make the script a wrapper around the cli so that anyone who uses pprof-post will find out it exists. Epic: none Release note: None --- scripts/pprof-post.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/pprof-post.sh b/scripts/pprof-post.sh index 0dcee107f121..e70f850c759b 100755 --- a/scripts/pprof-post.sh +++ b/scripts/pprof-post.sh @@ -1,11 +1,9 @@ #!/usr/bin/env bash set -euo pipefail -# Usage: $0 "optional description, defaults to current date" < somefile.pb.gz -out=$(curl -s 'https://api.polarsignals.com/api/share/v1/profiles' \ - -X POST \ - -F "description=${1-$(date -u)}" \ - -F "profile=@-") -echo -n "https://share.polarsignals.com/" -grep -Eo '[0-9a-f]{4,}' <<< "${out}" - +if ! which pprofme; then + echo "pprofme missing, setup instructions: https://github.com/polarsignals/pprofme#install" + exit 1 +fi + +pprofme upload "$@"