Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
feat(go): Update golang to v1.18.1
Browse files Browse the repository at this point in the history
Signed-off-by: qwqcode <[email protected]>
  • Loading branch information
qwqcode committed May 4, 2022
1 parent f5a5117 commit 2f012d9
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 111 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@ jobs:

steps:
- name: checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- run: git fetch --prune --unshallow --tags -f

- name: setup go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: '^1.16.6'
go-version: '^1.18.1'

# docker `golang-cross` image cache
# `cache-go-cross-v1-16-6`
# `cache-go-cross-v1-18-1`
- run: mkdir -p ~/docker-cache
- name: docker image cache
id: cache-go-cross-v1-16-6
id: cache-go-cross-v1-18-1
uses: actions/cache@v2
with:
path: ~/docker-cache
# Adjust key to meet your cache time requirements e.g.
# ${{ hashFiles(*) }} can be useful here to invalidate
# cache on file changes
key: cache-go-cross-v1-16-6
key: cache-go-cross-v1-18-1

- if: steps.cache-go-cross-v1-16-6.outputs.cache-hit != 'true'
- if: steps.cache-go-cross-v1-18-1.outputs.cache-hit != 'true'
run: |
docker pull troian/golang-cross:v1.16.6
docker save -o ~/docker-cache/golang-cross.tar troian/golang-cross:v1.16.6
docker pull ghcr.io/goreleaser/goreleaser-cross:v1.18.1
docker save -o ~/docker-cache/golang-cross.tar ghcr.io/goreleaser/goreleaser-cross:v1.18.1
- if: steps.cache-go-cross-v1-16-6.outputs.cache-hit == 'true'
- if: steps.cache-go-cross-v1-18-1.outputs.cache-hit == 'true'
run: docker load -i ~/docker-cache/golang-cross.tar

# build
Expand Down
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ builds:
- arm64
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
binary: "{{.ProjectName}}"
main: ./main.go
ldflags: *common_ldflags
Expand All @@ -102,6 +103,7 @@ builds:
- arm64
env:
- CC=oa64-clang
- CXX=oa64-clang++
binary: "{{.ProjectName}}"
main: ./main.go
ldflags: *common_ldflags
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### build ArtalkGo
FROM golang:1.17.2-alpine3.13 as builder
FROM golang:1.18.1-alpine3.15 as builder

WORKDIR /source

Expand All @@ -20,7 +20,7 @@ RUN set -ex \
&& make all

### build final image
FROM alpine:3.13
FROM alpine:3.15

# we set the timezone `Asia/Shanghai` by default, you can be modified
# by `docker build --build-arg="TZ=Other_Timezone ..."`
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PACKAGE_NAME := github.com/ArtalkJS/ArtalkGo
VERSION ?= $(shell git describe --tags --abbrev=0)
COMMIT_HASH := $(shell git rev-parse --short HEAD)
DEV_VERSION := dev-${COMMIT_HASH}
GO_VERSION ?= 1.16.6
GO_VERSION ?= 1.18.1

HAS_RICHGO := $(shell which richgo)
GOTEST ?= $(if $(HAS_RICHGO), richgo test, go test)
Expand Down Expand Up @@ -62,7 +62,7 @@ release-dry-run:
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
troian/golang-cross:v${GO_VERSION} \
ghcr.io/goreleaser/goreleaser-cross:v${GO_VERSION} \
--rm-dist --skip-validate --skip-publish


Expand All @@ -84,7 +84,7 @@ release:
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
troian/golang-cross:v${GO_VERSION} \
ghcr.io/goreleaser/goreleaser-cross:v${GO_VERSION} \
release --rm-dist --skip-validate

.PHONY: all install build build-frontend \
Expand Down
103 changes: 95 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ArtalkJS/ArtalkGo

go 1.16
go 1.18

require (
github.com/PuerkitoBio/goquery v1.7.1
Expand All @@ -12,17 +12,13 @@ require (
github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d
github.com/cheggaaa/pb/v3 v3.0.8
github.com/eko/gocache/v2 v2.1.0
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-redis/redis/v8 v8.11.5
github.com/go-testfixtures/testfixtures/v3 v3.6.1
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/jedib0t/go-pretty/v6 v6.2.4
github.com/jeremywohl/flatten v1.0.1
github.com/labstack/echo/v4 v4.5.0
github.com/markbates/pkger v0.17.1
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mattn/go-sqlite3 v1.14.8 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/microcosm-cc/bluemonday v1.0.18
github.com/mitchellh/mapstructure v1.4.1
github.com/nikoksr/notify v0.23.0
Expand All @@ -31,7 +27,6 @@ require (
github.com/rhysd/go-github-selfupdate v1.2.3
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5
github.com/sirupsen/logrus v1.8.1
github.com/smartystreets/assertions v1.0.1 // indirect
github.com/spf13/cobra v1.2.1
github.com/spf13/viper v1.8.1
github.com/steambap/captcha v1.4.1
Expand All @@ -43,12 +38,104 @@ require (
github.com/yuin/goldmark v1.4.0
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20220429121018-84afa8d3f7b3 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gorm.io/driver/mysql v1.1.2
gorm.io/driver/postgres v1.1.0
gorm.io/driver/sqlite v1.1.4
gorm.io/driver/sqlserver v1.0.8
gorm.io/gorm v1.21.13
)

require (
github.com/VividCortex/ewma v1.1.1 // indirect
github.com/XiaoMi/pegasus-go-client v0.0.0-20210427083443-f3b6b08bc4c2 // indirect
github.com/andybalholm/cascadia v1.2.0 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blinkbean/dingtalk v0.0.0-20210905093040-7d935c0f7e19 // indirect
github.com/cenkalti/backoff/v4 v4.1.2 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/denisenkom/go-mssqldb v0.10.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/fatih/color v1.10.0 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible // indirect
github.com/gobuffalo/here v0.6.0 // indirect
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-github/v30 v30.1.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.8.1 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.0.6 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.7.0 // indirect
github.com/jackc/pgx/v4 v4.11.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.2 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/labstack/gommon v0.3.0 // indirect
github.com/line/line-bot-sdk-go v7.8.0+incompatible // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mattn/go-sqlite3 v1.14.8 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pegasus-kv/thrift v0.13.0 // indirect
github.com/pelletier/go-toml v1.9.3 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.10.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.18.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/slack-go/slack v0.10.2 // indirect
github.com/smartystreets/assertions v1.0.1 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/tcnksm/go-gitconfig v0.1.2 // indirect
github.com/technoweenie/multipartstreamer v1.0.1 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/ulikunitz/xz v0.5.9 // indirect
github.com/utahta/go-linenotify v0.5.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.0.0-20220429121018-84afa8d3f7b3 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/apimachinery v0.0.0-20191123233150-4c4803ed55e3 // indirect
)
Loading

0 comments on commit 2f012d9

Please sign in to comment.