chore: upgrade golang to 1.17 (#648)

This commit is contained in:
Bo-Yi Wu 2021-12-15 18:09:43 +08:00 committed by GitHub
parent eaec26c90d
commit ccbe874bf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 19 deletions

View File

@ -18,7 +18,7 @@ steps:
- name: embedmd - name: embedmd
pull: always pull: always
image: golang:1.16 image: golang:1.17
commands: commands:
- make embedmd - make embedmd
volumes: volumes:
@ -39,7 +39,7 @@ steps:
- name: test - name: test
pull: always pull: always
image: golang:1.16 image: golang:1.17
commands: commands:
- make test - make test
environment: environment:
@ -82,7 +82,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always pull: always
image: golang:1.16 image: golang:1.17
commands: commands:
- go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/amd64/gorush - go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/amd64/gorush
environment: environment:
@ -94,7 +94,7 @@ steps:
- name: build-tag - name: build-tag
pull: always pull: always
image: golang:1.16 image: golang:1.17
commands: commands:
- go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/amd64/gorush - go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/amd64/gorush
environment: environment:
@ -105,7 +105,7 @@ steps:
- name: executable - name: executable
pull: always pull: always
image: golang:1.16 image: golang:1.17
commands: commands:
- ./release/linux/amd64/gorush --help - ./release/linux/amd64/gorush --help
@ -148,7 +148,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always pull: always
image: golang:1.16 image: golang:1.17
commands: commands:
- go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm64/gorush - go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm64/gorush
environment: environment:
@ -160,7 +160,7 @@ steps:
- name: build-tag - name: build-tag
pull: always pull: always
image: golang:1.16 image: golang:1.17
commands: commands:
- go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm64/gorush - go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm64/gorush
environment: environment:
@ -171,7 +171,7 @@ steps:
- name: executable - name: executable
pull: always pull: always
image: golang:1.16 image: golang:1.17
commands: commands:
- ./release/linux/arm64/gorush --help - ./release/linux/arm64/gorush --help
@ -214,7 +214,7 @@ platform:
steps: steps:
- name: build-push - name: build-push
pull: always pull: always
image: golang:1.16 image: golang:1.17
commands: commands:
- go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm/gorush - go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm/gorush
environment: environment:
@ -226,7 +226,7 @@ steps:
- name: build-tag - name: build-tag
pull: always pull: always
image: golang:1.16 image: golang:1.17
commands: commands:
- go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm/gorush - go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm/gorush
environment: environment:
@ -237,7 +237,7 @@ steps:
- name: executable - name: executable
pull: always pull: always
image: golang:1.16 image: golang:1.17
commands: commands:
- ./release/linux/arm/gorush --help - ./release/linux/arm/gorush --help
@ -280,7 +280,7 @@ platform:
steps: steps:
- name: build-all-binary - name: build-all-binary
pull: always pull: always
image: golang:1.16 image: golang:1.17
commands: commands:
- make release - make release
when: when:

View File

@ -23,7 +23,7 @@
}, },
{ {
name: 'embedmd', name: 'embedmd',
image: 'golang:1.16', image: 'golang:1.17',
pull: 'always', pull: 'always',
commands: [ commands: [
'make embedmd', 'make embedmd',
@ -54,7 +54,7 @@
}, },
{ {
name: 'test', name: 'test',
image: 'golang:1.16', image: 'golang:1.17',
pull: 'always', pull: 'always',
environment: { environment: {
ANDROID_API_KEY: { 'from_secret': 'android_api_key' }, ANDROID_API_KEY: { 'from_secret': 'android_api_key' },
@ -110,7 +110,7 @@
steps: [ steps: [
{ {
name: 'build-push', name: 'build-push',
image: 'golang:1.16', image: 'golang:1.17',
pull: 'always', pull: 'always',
environment: { environment: {
CGO_ENABLED: '0', CGO_ENABLED: '0',
@ -126,7 +126,7 @@
}, },
// { // {
// name: 'build-push-lambda', // name: 'build-push-lambda',
// image: 'golang:1.16', // image: 'golang:1.17',
// pull: 'always', // pull: 'always',
// environment: { // environment: {
// CGO_ENABLED: '0', // CGO_ENABLED: '0',
@ -142,7 +142,7 @@
// }, // },
{ {
name: 'build-tag', name: 'build-tag',
image: 'golang:1.16', image: 'golang:1.17',
pull: 'always', pull: 'always',
environment: { environment: {
CGO_ENABLED: '0', CGO_ENABLED: '0',
@ -156,7 +156,7 @@
}, },
{ {
name: 'executable', name: 'executable',
image: 'golang:1.16', image: 'golang:1.17',
pull: 'always', pull: 'always',
commands: [ commands: [
'./release/' + os + '/' + arch + '/' + name + ' --help', './release/' + os + '/' + arch + '/' + name + ' --help',
@ -205,7 +205,7 @@
steps: [ steps: [
{ {
name: 'build-all-binary', name: 'build-all-binary',
image: 'golang:1.16', image: 'golang:1.17',
pull: 'always', pull: 'always',
commands: [ commands: [
'make release' 'make release'