0
Files
opengrok/dev/get_upload_url.sh
Vladimir Kotal a7f2ef98bd fix the URL
also do not print if GITHUB_OUTPUT env var is empty
2024-08-01 12:22:18 +02:00

15 lines
584 B
Bash
Executable File

#!/bin/bash
#
# The purpose of this script is to retrieve upload URL for OpenGrok release given by the tag
# stored in the OPENGROK_TAG environment variable.
# The value is stored in a special file consumed by Github action so that it can be used
# to upload assets to the related OpenGrok release on Github.
#
echo "Getting upload URL for $OPENGROK_TAG"
upload_url=$( curl -s https://api.github.com/repos/oracle/opengrok/releases/tags/$OPENGROK_TAG | jq -r .upload_url )
echo "Got '$upload_url'"
if [[ -n $GITHUB_OUTPUT ]]; then
echo "upload_url=$upload_url" >> $GITHUB_OUTPUT
fi