From 503b8895c59761dcb54862b2c4f52fb2546ccb59 Mon Sep 17 00:00:00 2001 From: gauravsaini04 <147703805+gauravsaini04@users.noreply.github.com> Date: Sun, 10 Mar 2024 00:17:39 +0000 Subject: [PATCH 1/2] changes as requested --- src/kubectl-helm-minikube/install.sh | 2 +- test/docker-in-docker/docker_build_fallback_buildx.sh | 2 +- test/kubectl-helm-minikube/install_only_helm_fallback.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kubectl-helm-minikube/install.sh b/src/kubectl-helm-minikube/install.sh index 69d4e0237..06481c62d 100755 --- a/src/kubectl-helm-minikube/install.sh +++ b/src/kubectl-helm-minikube/install.sh @@ -159,7 +159,7 @@ fi 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' + curl -s "$repo_url" | jq -r 'del(.[].assets) | .[0].tag_name' } get_helm() { diff --git a/test/docker-in-docker/docker_build_fallback_buildx.sh b/test/docker-in-docker/docker_build_fallback_buildx.sh index 8d30d2a46..79f7bebef 100644 --- a/test/docker-in-docker/docker_build_fallback_buildx.sh +++ b/test/docker-in-docker/docker_build_fallback_buildx.sh @@ -26,7 +26,7 @@ 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 + curl -s "$repo_url" | jq -r 'del(.[].assets) | .[0].tag_name' # this would del the assets key and then get the second encountered tag_name's value from the filtered array of objects } # Function to change the patch number in a semver version diff --git a/test/kubectl-helm-minikube/install_only_helm_fallback.sh b/test/kubectl-helm-minikube/install_only_helm_fallback.sh index 58ed137de..b8071a0b5 100644 --- a/test/kubectl-helm-minikube/install_only_helm_fallback.sh +++ b/test/kubectl-helm-minikube/install_only_helm_fallback.sh @@ -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() { From b5ab4ad2ca418d2e05bc07de662ed8e5e8c2b971 Mon Sep 17 00:00:00 2001 From: gauravsaini04 <147703805+gauravsaini04@users.noreply.github.com> Date: Mon, 11 Mar 2024 22:51:35 +0000 Subject: [PATCH 2/2] changes acc. to comments --- src/kubectl-helm-minikube/devcontainer-feature.json | 2 +- src/kubectl-helm-minikube/install.sh | 2 +- test/docker-in-docker/docker_build_fallback_buildx.sh | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kubectl-helm-minikube/devcontainer-feature.json b/src/kubectl-helm-minikube/devcontainer-feature.json index 16472205f..41a8b8b68 100644 --- a/src/kubectl-helm-minikube/devcontainer-feature.json +++ b/src/kubectl-helm-minikube/devcontainer-feature.json @@ -1,6 +1,6 @@ { "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.", diff --git a/src/kubectl-helm-minikube/install.sh b/src/kubectl-helm-minikube/install.sh index 06481c62d..d7de3984f 100755 --- a/src/kubectl-helm-minikube/install.sh +++ b/src/kubectl-helm-minikube/install.sh @@ -158,7 +158,7 @@ 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 + # 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' } diff --git a/test/docker-in-docker/docker_build_fallback_buildx.sh b/test/docker-in-docker/docker_build_fallback_buildx.sh index 79f7bebef..707e0a68a 100644 --- a/test/docker-in-docker/docker_build_fallback_buildx.sh +++ b/test/docker-in-docker/docker_build_fallback_buildx.sh @@ -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) | .[0].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