github.com/quay/claircore@v1.5.28/.github/scripts/get-latest-golang-minor-version.sh (about)

     1  #!/bin/sh
     2  MAJOR_VERSION=${1?missing required argument: language version}
     3  
     4  curl -sSfL 'https://golang.org/dl/?mode=json&include=all' |
     5  jq -r --arg 'v' "$MAJOR_VERSION" '[
     6  	.[] |
     7  	.version |
     8  	select(
     9  		[
    10  			contains("go\($v)"),
    11  			(contains("rc") | not)
    12  		] |
    13  		all
    14  	) |
    15  	ltrimstr("go")
    16  ] |
    17  first'