diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed1ab356..7062ae78 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,7 @@ # along with ProtonMail Bridge. If not, see . --- -image: harbor.protontech.ch/docker.io/library/golang:1.18 +image: gitlab.protontech.ch:4567/go/bridge-internal:test-go1.20 variables: GOPRIVATE: gitlab.protontech.ch @@ -126,10 +126,10 @@ test-integration-race: .windows-base: before_script: - - export GOROOT=/c/Go1.18 + - export GOROOT=/c/Go1.20 - export PATH=$GOROOT/bin:$PATH - export GOARCH=amd64 - - export GOPATH=~/go18 + - export GOPATH=~/go1.20 - export GO111MODULE=on - export PATH=$GOPATH/bin:$PATH - export MSYSTEM= @@ -172,7 +172,7 @@ test-windows: .linux-build-setup: - image: gitlab.protontech.ch:4567/go/bridge-internal:qt6 + image: gitlab.protontech.ch:4567/go/bridge-internal:build-go1.20-qt6.3.2 variables: VCPKG_DEFAULT_BINARY_CACHE: ${CI_PROJECT_DIR}/.cache cache: @@ -209,7 +209,7 @@ build-linux-qa: - export PATH=/usr/local/opt/make/libexec/gnubin:$PATH - export PATH=/usr/local/opt/go@1.13/bin:$PATH - export PATH=/usr/local/opt/gnu-sed/libexec/gnubin:$PATH - - export GOPATH=~/go + - export GOPATH=~/go1.20 - export PATH=$GOPATH/bin:$PATH - export CGO_CPPFLAGS='-Wno-error -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-builtin-requires-header' - $(git config --global -l | grep -o 'url.*gitlab.protontech.ch.*insteadof' | xargs -L 1 git config --global --unset &> /dev/null) || echo "nothing to remove" @@ -231,10 +231,10 @@ build-darwin-qa: .windows-build-setup: before_script: - - export GOROOT=/c/Go1.18/ + - export GOROOT=/c/Go1.20/ - export PATH=$GOROOT/bin:$PATH - export GOARCH=amd64 - - export GOPATH=~/go18 + - export GOPATH=~/go1.20 - export GO111MODULE=on - export PATH="${GOPATH}/bin:${PATH}" - export MSYSTEM= diff --git a/BUILDS.md b/BUILDS.md index eb4abc7a..237694bd 100644 --- a/BUILDS.md +++ b/BUILDS.md @@ -3,7 +3,7 @@ ## Prerequisites * 64-bit OS: - the go-rfc5322 module cannot currently be compiled for 32-bit OSes -* Go 1.18 +* Go 1.20 * Bash with basic build utils: make, gcc, sed, find, grep, ... - For Windows, it is recommended to use MinGW 64bit shell from [MSYS2](https://www.msys2.org/) * GCC (Linux), msvc (Windows) or Xcode (macOS) diff --git a/go.mod b/go.mod index 87cb8bc8..d109e84c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ProtonMail/proton-bridge/v3 -go 1.18 +go 1.20 require ( github.com/0xAX/notificator v0.0.0-20220220101646-ee9b8921e557 diff --git a/internal/app/app.go b/internal/app/app.go index 16487e51..f2c15178 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -19,14 +19,12 @@ package app import ( "fmt" - "math/rand" "net/http" "net/http/cookiejar" "net/url" "os" "path/filepath" "runtime" - "time" "github.com/Masterminds/semver/v3" "github.com/ProtonMail/gluon/async" @@ -160,9 +158,6 @@ func New() *cli.App { } func run(c *cli.Context) error { - // Seed the default RNG from the math/rand package. - rand.Seed(time.Now().UnixNano()) - // Get the current bridge version. version, err := semver.NewVersion(constants.Version) if err != nil {