MM-49703: Bump Go version to 1.19 (#22107)
https://mattermost.atlassian.net/browse/MM-49703 Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
305fbb17cf
Коммит
f76d240495
@@ -212,7 +212,7 @@ jobs:
|
||||
check-golangci-lint:
|
||||
docker:
|
||||
# Keep the version in sync with the command in Makefile
|
||||
- image: golangci/golangci-lint:v1.46.2
|
||||
- image: golangci/golangci-lint:v1.50.1
|
||||
resource_class: xlarge
|
||||
working_directory: /mnt/ramdisk
|
||||
steps:
|
||||
@@ -226,7 +226,7 @@ jobs:
|
||||
# Dedicate job for mattermost-vet to make more clear when the job fails
|
||||
check-mattermost-vet:
|
||||
docker:
|
||||
- image: mattermost/mattermost-build-server:20220415_golang-1.18.1
|
||||
- image: mattermost/mattermost-build-server:20230118_golang-1.19.5
|
||||
resource_class: xlarge
|
||||
working_directory: /mnt/ramdisk
|
||||
steps:
|
||||
@@ -256,7 +256,7 @@ jobs:
|
||||
make build
|
||||
build-focalboard:
|
||||
docker:
|
||||
- image: mattermost/mattermost-build-server:20220415_golang-1.18.1
|
||||
- image: mattermost/mattermost-build-server:20230118_golang-1.19.5
|
||||
resource_class: medium
|
||||
working_directory: /mnt/ramdisk
|
||||
steps:
|
||||
@@ -268,7 +268,7 @@ jobs:
|
||||
make server-linux
|
||||
build-mattermost-server:
|
||||
docker:
|
||||
- image: mattermost/mattermost-build-server:20220415_golang-1.18.1
|
||||
- image: mattermost/mattermost-build-server:20230118_golang-1.19.5
|
||||
resource_class: xlarge
|
||||
working_directory: /mnt/ramdisk
|
||||
steps:
|
||||
@@ -384,7 +384,7 @@ jobs:
|
||||
--env CIRCLECI=true \
|
||||
-v ~/mattermost:/mattermost \
|
||||
-w /mattermost/mattermost-server \
|
||||
mattermost/mattermost-build-server:20220415_golang-1.18.1 \
|
||||
mattermost/mattermost-build-server:20230118_golang-1.19.5 \
|
||||
bash -c "ulimit -n 8096; make test-server<< parameters.racemode >> BUILD_NUMBER=$CIRCLE_BRANCH-$CIRCLE_PREVIOUS_BUILD_NUM TESTFLAGS= TESTFLAGSEE=" \
|
||||
bash -c scripts/diff-email-templates.sh
|
||||
no_output_timeout: 2h
|
||||
@@ -449,7 +449,7 @@ jobs:
|
||||
--env MM_SQLSETTINGS_DRIVERNAME=postgres \
|
||||
-v ~/mattermost:/mattermost \
|
||||
-w /mattermost/mattermost-server \
|
||||
mattermost/mattermost-build-server:20220415_golang-1.18.1 \
|
||||
mattermost/mattermost-build-server:20230118_golang-1.19.5 \
|
||||
bash -c "ulimit -n 8096; make ARGS='db migrate' run-cli && make MM_SQLSETTINGS_DATASOURCE='postgres://mmuser:mostest@postgres:5432/latest?sslmode=disable&connect_timeout=10' ARGS='db migrate' run-cli"
|
||||
echo "Generating dump"
|
||||
docker-compose --no-ansi exec -T postgres pg_dump --schema-only -d migrated -U mmuser > migrated.sql
|
||||
@@ -475,7 +475,7 @@ jobs:
|
||||
--env MM_SQLSETTINGS_DRIVERNAME=mysql \
|
||||
-v ~/mattermost:/mattermost \
|
||||
-w /mattermost/mattermost-server \
|
||||
mattermost/mattermost-build-server:20220415_golang-1.18.1 \
|
||||
mattermost/mattermost-build-server:20230118_golang-1.19.5 \
|
||||
bash -c "ulimit -n 8096; make ARGS='db migrate' run-cli && make MM_SQLSETTINGS_DATASOURCE='mmuser:mostest@tcp(mysql:3306)/latest?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s' ARGS='db migrate' run-cli"
|
||||
echo "Generating dump"
|
||||
docker-compose --no-ansi exec -T mysql mysqldump --skip-opt --no-data --compact -u root -pmostest migrated > migrated.sql
|
||||
|
||||
@@ -15,18 +15,15 @@ linters-settings:
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
- deadcode
|
||||
- gofmt
|
||||
- golint
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- exportloopref
|
||||
- structcheck
|
||||
- staticcheck
|
||||
- unconvert
|
||||
- unused
|
||||
- varcheck
|
||||
- misspell
|
||||
- goimports
|
||||
# TODO: enable this later
|
||||
|
||||
2
Makefile
2
Makefile
@@ -312,7 +312,7 @@ endif
|
||||
|
||||
golangci-lint: ## Run golangci-lint on codebase
|
||||
@# Keep the version in sync with the command in .circleci/config.yml
|
||||
$(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
|
||||
$(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1
|
||||
|
||||
@echo Running golangci-lint
|
||||
$(GOBIN)/golangci-lint run ./...
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM golang:1.18.1@sha256:ee752bc53c628ff789bacefb714cff721701042ffa9eb736f7b2ed4e9f2bdab6
|
||||
FROM golang:1.19.5@sha256:bb9811fad43a7d6fd2173248d8331b2dcf5ac9af20976b1937ecd214c5b8c383
|
||||
|
||||
RUN apt-get update && apt-get install -y make git apt-transport-https ca-certificates curl software-properties-common build-essential zip xmlsec1 jq
|
||||
|
||||
2
go.mod
2
go.mod
@@ -1,6 +1,6 @@
|
||||
module github.com/mattermost/mattermost-server/v6
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
code.sajari.com/docconv v1.3.5
|
||||
|
||||
@@ -4,7 +4,7 @@ if [[ $1 != "true" ]] ;
|
||||
then
|
||||
echo "Creating a go.work file"
|
||||
|
||||
txt="go 1.18\n\nuse ./\n"
|
||||
txt="go 1.19\n\nuse ./\n"
|
||||
|
||||
if [ "$BUILD_ENTERPRISE_READY" == "true" ]
|
||||
then
|
||||
@@ -17,4 +17,4 @@ then
|
||||
fi
|
||||
|
||||
printf "$txt" > "go.work"
|
||||
fi
|
||||
fi
|
||||
|
||||
Ссылка в новой задаче
Block a user