Add Go 1.20 support

This commit is contained in:
Oscar Tovar 2023-05-06 01:56:00 +00:00 committed by Stan Hu
parent aff31cf90d
commit de3bd7ec56
4 changed files with 22 additions and 10 deletions

View file

@ -29,7 +29,14 @@ function build_ubi() {
cd /usr/local/go/src
PATH=$PATH:/tmp/golang/go/bin CGO_ENABLED=1 ./make.bash
else
git clone https://github.com/golang-fips/go.git --branch "go${GO_MAJOR_VERSION}-fips-release" --single-branch --depth 1 /tmp/golang-fips
# This is a workaround until https://github.com/golang-fips/go/issues/82 is resolved.
if [[ $GO_MAJOR_VERSION == "1.20" ]]; then
GO_BRANCH="go1.20.3-openssl-fips"
else
GO_BRANCH="go${GO_MAJOR_VERSION}-fips-release"
fi
git clone https://github.com/golang-fips/go.git --branch "${GO_BRANCH}" --single-branch --depth 1 /tmp/golang-fips
cd /tmp/golang-fips
# The initialize script ends with a commit, so we need to set the user info. And needs to be global due to submodules in use.