Skip to content

Commit

Permalink
Reverting get_previous_version logic to get the first tag_name's valu…
Browse files Browse the repository at this point in the history
…e from json (#902)

* changes as requested

* changes acc. to comments
  • Loading branch information
gauravsaini04 authored Mar 15, 2024
1 parent 5ad3f6f commit 2495879
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/kubectl-helm-minikube/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -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.",
Expand Down
4 changes: 2 additions & 2 deletions src/kubectl-helm-minikube/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 2 additions & 1 deletion test/docker-in-docker/docker_build_fallback_buildx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/kubectl-helm-minikube/install_only_helm_fallback.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 2495879

Please sign in to comment.