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

updated check_upstream_golang.sh to properly set empty variables #1464

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

vineeth-bandi
Copy link
Member

@vineeth-bandi vineeth-bandi commented Jul 17, 2024

Issue #, if available:

Description of changes:
updated scripts to set empty variables when unable to find the proper version. Updated eks-distro-base/scripts/check_upstream_golang.sh to use yq to find version information.

➜  eks-distro-build-tooling git:(fix-go-version) ✗ make check-golang-release -C eks-distro-base
/eks-distro-build-tooling/eks-distro-base/scripts/check_upstream_golang
+ GO_PREFIX=go
+++ dirname /eks-distro-build-tooling/eks-distro-base/scripts/check_upstream_golang
++ cd /eks-distro-build-tooling/eks-distro-base/scripts
++ pwd -P
+ SCRIPT_ROOT=/eks-distro-build-tooling/eks-distro-base/scripts
+ VERSIONS_YAML=/eks-distro-build-tooling/eks-distro-base/scripts/../golang_versions.yaml
++ curl 'https://go.dev/dl/?mode=json'
++ jq -r '.[].version'
++ sed -e 's/^go//'
++ sort
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 23677  100 23677    0     0  55377      0 --:--:-- --:--:-- --:--:-- 55320
+ ACTIVE_VERSIONS='1.21.12
1.22.5'
+ for version in '${ACTIVE_VERSIONS}'
+++ echo 1.21.12
+++ awk -F. '{print NF}'
++ [[ 3 -ge 3 ]]
++ echo 1.21
+ MAJORVERSION=1.21
++ yq '.golang.versions["GOLANG_1.21_FULL_VERSION"]' /eks-distro-build-tooling/eks-distro-base/scripts/../golang_versions.yaml
+ MINIMAL_GO_VERSION=1.21.12-0
+ [[ ! 1.21.12-0 =~ 1.21.12 ]]
+ for version in '${ACTIVE_VERSIONS}'
+++ echo 1.22.5
+++ awk -F. '{print NF}'
++ [[ 3 -ge 3 ]]
++ echo 1.22
+ MAJORVERSION=1.22
++ yq '.golang.versions["GOLANG_1.22_FULL_VERSION"]' /eks-distro-build-tooling/eks-distro-base/scripts/../golang_versions.yaml
+ MINIMAL_GO_VERSION=1.22.5-0
+ [[ ! 1.22.5-0 =~ 1.22.5 ]]

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions github-actions bot added minimal-image Changes related to the minimal-images or tooling builder-base labels Jul 17, 2024
@natechensan
Copy link
Member

/approve

1 similar comment
@rcrozean
Copy link
Member

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: natechensan, rcrozean

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rcrozean
Copy link
Member

/lgtm

@eks-distro-bot eks-distro-bot merged commit 205ba0c into aws:main Jul 17, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved builder-base lgtm minimal-image Changes related to the minimal-images or tooling size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants