upgrade to go1.13

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2019-09-25 18:43:28 +08:00
parent 3d2c9a75cf
commit e6bc04f39c
2 changed files with 22 additions and 52 deletions

View File

@ -9,45 +9,38 @@ platform:
steps:
- name: vet
pull: always
image: golang:1.12
image: golang:1.13
commands:
- make vet
environment:
GO111MODULE: on
volumes:
- name: gopath
path: /go
- name: lint
pull: always
image: golang:1.12
image: golang:1.13
commands:
- make lint
environment:
GO111MODULE: on
volumes:
- name: gopath
path: /go
- name: misspell
pull: always
image: golang:1.12
image: golang:1.13
commands:
- make misspell-check
environment:
GO111MODULE: on
volumes:
- name: gopath
path: /go
- name: test
pull: always
image: golang:1.12
image: golang:1.13
commands:
- make test
- make coverage
environment:
GO111MODULE: on
TELEGRAM_TO:
from_secret: telegram_to
TELEGRAM_TOKEN:
@ -78,12 +71,11 @@ platform:
steps:
- name: build-push
pull: always
image: golang:1.12
image: golang:1.13
commands:
- "go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/amd64/drone-telegram"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
exclude:
@ -91,19 +83,18 @@ steps:
- name: build-tag
pull: always
image: golang:1.12
image: golang:1.13
commands:
- "go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/amd64/drone-telegram"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: executable
pull: always
image: golang:1.12
image: golang:1.13
commands:
- ./release/linux/amd64/drone-telegram --help
@ -159,12 +150,11 @@ platform:
steps:
- name: build-push
pull: always
image: golang:1.12
image: golang:1.13
commands:
- "go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm64/drone-telegram"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
exclude:
@ -172,19 +162,18 @@ steps:
- name: build-tag
pull: always
image: golang:1.12
image: golang:1.13
commands:
- "go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm64/drone-telegram"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: executable
pull: always
image: golang:1.12
image: golang:1.13
commands:
- ./release/linux/arm64/drone-telegram --help
@ -240,12 +229,11 @@ platform:
steps:
- name: build-push
pull: always
image: golang:1.12
image: golang:1.13
commands:
- "go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm/drone-telegram"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
exclude:
@ -253,19 +241,18 @@ steps:
- name: build-tag
pull: always
image: golang:1.12
image: golang:1.13
commands:
- "go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm/drone-telegram"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: executable
pull: always
image: golang:1.12
image: golang:1.13
commands:
- ./release/linux/arm/drone-telegram --help
@ -321,11 +308,9 @@ platform:
steps:
- name: build-all-binary
pull: always
image: golang:1.12
image: golang:1.13
commands:
- make release
environment:
GO111MODULE: on
when:
event:
- tag

View File

@ -9,11 +9,8 @@
steps: [
{
name: 'vet',
image: 'golang:1.12',
image: 'golang:1.13',
pull: 'always',
environment: {
GO111MODULE: 'on',
},
commands: [
'make vet',
],
@ -26,11 +23,8 @@
},
{
name: 'lint',
image: 'golang:1.12',
image: 'golang:1.13',
pull: 'always',
environment: {
GO111MODULE: 'on',
},
commands: [
'make lint',
],
@ -43,11 +37,8 @@
},
{
name: 'misspell',
image: 'golang:1.12',
image: 'golang:1.13',
pull: 'always',
environment: {
GO111MODULE: 'on',
},
commands: [
'make misspell-check',
],
@ -60,10 +51,9 @@
},
{
name: 'test',
image: 'golang:1.12',
image: 'golang:1.13',
pull: 'always',
environment: {
GO111MODULE: 'on',
TELEGRAM_TOKEN: { 'from_secret': 'telegram_token' },
TELEGRAM_TO: { 'from_secret': 'telegram_to' },
},
@ -105,11 +95,10 @@
steps: [
{
name: 'build-push',
image: 'golang:1.12',
image: 'golang:1.13',
pull: 'always',
environment: {
CGO_ENABLED: '0',
GO111MODULE: 'on',
},
commands: [
'go build -v -ldflags \'-X main.build=${DRONE_BUILD_NUMBER}\' -a -o release/' + os + '/' + arch + '/' + name,
@ -122,11 +111,10 @@
},
{
name: 'build-tag',
image: 'golang:1.12',
image: 'golang:1.13',
pull: 'always',
environment: {
CGO_ENABLED: '0',
GO111MODULE: 'on',
},
commands: [
'go build -v -ldflags \'-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\' -a -o release/' + os + '/' + arch + '/' + name,
@ -137,7 +125,7 @@
},
{
name: 'executable',
image: 'golang:1.12',
image: 'golang:1.13',
pull: 'always',
commands: [
'./release/' + os + '/' + arch + '/' + name + ' --help',
@ -202,11 +190,8 @@
steps: [
{
name: 'build-all-binary',
image: 'golang:1.12',
image: 'golang:1.13',
pull: 'always',
environment: {
GO111MODULE: 'on',
},
commands: [
'make release'
],