File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 48
48
steps :
49
49
- name : Set GO env
50
50
run : |
51
+ # Enable extended globbing features to use advanced pattern matching
52
+ shopt -s extglob
53
+
51
54
# Get latest containerd
52
55
args=(curl --proto '=https' --tlsv1.2 -fsSL -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28")
53
56
[ "${GITHUB_TOKEN:-}" == "" ] && {
59
62
# Get latest golang version and split it in components
60
63
norm=()
61
64
while read -r line; do
62
- norm+=("$line")
65
+ line_trimmed="${line//+([[:space:]])/}"
66
+ norm+=("$line_trimmed")
63
67
done < \
64
68
<(sed -E 's/^go([0-9]+)[.]([0-9]+)([.]([0-9]+))?(([a-z]+)([0-9]+))?/\1.\2\n\4\n\6\n\7/i' \
65
69
<(curl -fsSL "https://go.dev/dl/?mode=json&include=all" | jq -rc .[0].version) \
You can’t perform that action at this time.
0 commit comments