Skip to content

Simplified generating of .env file

Konstantin Belykh requested to merge belykh_k/ into main

This change utilises ability for jq to find values of keys across different objects and by using grep we can filter out unneeded url of releases.

Simple explanation how it works:

  1. Get all needed prerequisite info from gitlab:
CASTOPOD_VERSION=$(echo $(curl --silent | jq '.[0] | .tag_name') | tr -d '"')
  1. Download information about latest release:
echo $(curl --silent ${LATEST_RELEASE_URL})
  1. Download information about all urls of released files
echo $(curl --silent ${LATEST_RELEASE_URL} | jq '.assets.links[].url')
  1. Filter out links so we only get .zip one
echo $(curl --silent ${LATEST_RELEASE_URL} | jq '.assets.links[].url' | grep -e '.zip')
  1. Clean up " from link
echo $(curl --silent ${LATEST_RELEASE_URL} | jq '.assets.links[].url' | grep -e '.zip' | tr -d '"')

Merge request reports