Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Version and not able to test the Url's #25

Open
pridhviraj2602 opened this issue Jun 10, 2024 · 8 comments
Open

Upgrade Version and not able to test the Url's #25

pridhviraj2602 opened this issue Jun 10, 2024 · 8 comments

Comments

@pridhviraj2602
Copy link

root@eric-VirtualBox:/home/eric/Documents/CustomerSuccess-main/tools# apt upgrade jq

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

jq is already the newest version (1.6-2.1ubuntu3).

Calculating upgrade... Done

Get more security updates through Ubuntu Pro with 'esm-apps' enabled:

imagemagick libopenexr25 libmagickcore-6.q16-6-extra libmagickwand-6.q16-6

imagemagick-6.q16 libmagickcore-6.q16-6 imagemagick-6-common libde265-0

Learn more about Ubuntu Pro at https://ubuntu.com/pro

The following packages have been kept back:

libfprint-2-2

0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

root@eric-VirtualBox:/home/eric/Documents/CustomerSuccess-main/tools# ./klcr.sh -i envs.json -o ./xc

jq version is below version 1.7, please upgrade to version 1.7 before continuing

@pridhviraj2602
Copy link
Author

It's just telling us to upgrade the version and not letting us test the scripts

@dlamotta
Copy link
Collaborator

Hi @pridhviraj2602 - and apt update in Ubuntu will pull 1.6. In my local Ubuntu machine, I had to manually download 1.7.1 to make it work.

@linziee
Copy link

linziee commented Jun 27, 2024

@dlamotta
$ jq --version
jq-1.7
$ ./klcr.sh -i envs.json -o ./xc -k
jq version is below version 1.7, please upgrade to version 1.7 before continuing

@dlamotta
Copy link
Collaborator

@linziee on version 2.3.1, you can comment out lines 643..648 and test. If the script works with 1.7, we'll create an issue and address it. I already see the extra 0 may not be returned when the version is 1.7, so it could be a small bug. Cc @dsglaser

@dsglaser
Copy link
Contributor

Yep, looks like it wasn't handling if jq didn't return a tertiary version (i.e. 1.7.0). I'm working on a PR to handle it and should have it done by EOD. Thanks @linziee

@linziee
Copy link

linziee commented Jul 1, 2024

@dlamotta
Suggest these edits to section in lines 642 - 648. Had issues with comparing a string to an integer in the current version.

Check that jq is at version 1.7.0 or above

jq_ver=$(jq -V | grep -o '[0-9]+.[0-9]+' | head -1)
jq_ver_major=$(echo $jq_ver | cut -d. -f1)
jq_ver_minor=$(echo $jq_ver | cut -d. -f2)

if [[ "$jq_ver_major" -lt 1 ]] || { [[ "$jq_ver_major" -eq 1 ]] && [[ "$jq_ver_minor" -lt 7 ]]; }; then
echo "jq version is below version 1.7, please upgrade to version 1.7 before continuing"
exit 1
fi

@dlamotta
Copy link
Collaborator

dlamotta commented Jul 2, 2024

@dsglaser please take a look at the suggestion by @linziee

@dsglaser
Copy link
Contributor

dsglaser commented Jul 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants