Unverified Commit 2495879e authored by Gaurav Saini's avatar Gaurav Saini Committed by GitHub

Reverting get_previous_version logic to get the first tag_name's value from json (#902)

* changes as requested

* changes acc. to comments
parent 5ad3f6fb
{
"id": "kubectl-helm-minikube",
"version": "1.1.7",
"version": "1.1.8",
"name": "Kubectl, Helm, and Minikube",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/kubectl-helm-minikube",
"description": "Installs latest version of kubectl, Helm, and optionally minikube. Auto-detects latest versions and installs needed dependencies.",
......
......@@ -158,8 +158,8 @@ fi
# Function to fetch the version released prior to the latest version
get_previous_version() {
repo_url=$1
# this would del the assets key and then get the second encountered tag_name's value from the filtered array of objects
curl -s "$repo_url" | jq -r 'del(.[].assets) | .[1].tag_name'
# this would del the assets key and then get the first encountered tag_name's value from the filtered array of objects
curl -s "$repo_url" | jq -r 'del(.[].assets) | .[0].tag_name'
}
get_helm() {
......
......@@ -26,7 +26,8 @@ get_latest_version() {
# Function to fetch the previous version of the plugin
get_previous_version() {
curl -s "$repo_url" | jq -r 'del(.[].assets) | .[1].tag_name' # this would del the assets key and then get the second encountered tag_name's value from the filtered array of objects
# this would del the assets key and then get the first encountered tag_name's value from the filtered array of objects
curl -s "$repo_url" | jq -r 'del(.[].assets) | .[0].tag_name'
}
# Function to change the patch number in a semver version
......
......@@ -57,7 +57,7 @@ change_patch_number() {
# Function to fetch the previous version of the plugin
get_previous_version() {
# this would del the assets key and then get the second encountered tag_name's value from the filtered array of objects
curl -s "$repo_url" | jq -r 'del(.[].assets) | .[1].tag_name'
curl -s "$repo_url" | jq -r 'del(.[].assets) | .[0].tag_name'
}
get_helm() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment