From 6b49f7fa96e7a8413eaaa2e3babf08abc796c35b Mon Sep 17 00:00:00 2001 From: Will Roden Date: Thu, 3 Aug 2023 16:28:36 -0500 Subject: [PATCH 1/3] support .0 releases starting with 1.21.0 --- src/lib.pl | 8 ++++++++ src/lib_test.sh | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/lib.pl b/src/lib.pl index 8a6c0ed..c7b7800 100644 --- a/src/lib.pl +++ b/src/lib.pl @@ -72,6 +72,14 @@ sub go_version_string { my $major_v = $$v{"major"}; my $minor_v = $$v{"minor"}; my $patch_v = $$v{"patch"}; + + # For 1.21 and above with no pre-release, always return major.minor.patch + if ( $major_v > 1 || ( $major_v == 1 && $minor_v >= 21 ) ) { + if ( $$v{"pre_release"} eq "" ) { + return "$major_v.$minor_v.$patch_v"; + } + } + $patch_v = "" if $patch_v == 0; $minor_v = "" if $minor_v == 0 && $patch_v eq ""; my $st = "$$v{'major'}"; diff --git a/src/lib_test.sh b/src/lib_test.sh index 86c6dac..56f9c2f 100755 --- a/src/lib_test.sh +++ b/src/lib_test.sh @@ -88,6 +88,9 @@ test_select_go_version() { do_test_select_go_version "" "x" "1.14beta1" do_test_select_go_version "0" "x" "0" do_test_select_go_version "" "1.2.3" + do_test_select_go_version "1.21.0" "1.21.x" "1.21.0" + do_test_select_go_version "1.21.0" "1.21" "1.21.0" + do_test_select_go_version "1.20" "1.20.x" "1.20.0" } test_select_remote_version() { From 852afdbbc03bd0a2cf5085352137d8f3e635f693 Mon Sep 17 00:00:00 2001 From: Will Roden Date: Thu, 3 Aug 2023 16:32:10 -0500 Subject: [PATCH 2/3] update matrix os --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 269ace9..a71b0a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,9 +20,10 @@ jobs: matrix: os: - ubuntu-20.04 - - ubuntu-18.04 + - ubuntu-22.04 - windows-2019 - - macos-10.15 + - windows-2022 + - macos-11 runs-on: ${{ matrix.os }} defaults: run: From baaad2af7f3ce888403d9efac00f8bcc30daa3fd Mon Sep 17 00:00:00 2001 From: Will Roden Date: Thu, 3 Aug 2023 16:33:17 -0500 Subject: [PATCH 3/3] more matrix os --- .github/workflows/integration.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index d928100..316a8e5 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -7,8 +7,8 @@ jobs: fail-fast: false matrix: os: - - ubuntu-20.04 - - windows-2019 + - ubuntu-22.04 + - windows-2022 runs-on: ${{ matrix.os }} defaults: run: @@ -37,9 +37,10 @@ jobs: matrix: os: - ubuntu-20.04 - - ubuntu-18.04 + - ubuntu-22.04 - windows-2019 - - macos-10.15 + - windows-2022 + - macos-11 runs-on: ${{ matrix.os }} defaults: run: