Skip to content

Commit 67031a2

Browse files
authored
fix(release): fetch tags first (#201)
Fetches tags in the release pipeline so the versions reported by `tk --version` are actually semvers, not commit hashes
1 parent b5fd1cc commit 67031a2

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

.drone/drone.jsonnet

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local golang = 'golang:1.12';
1+
local golang = 'golang:1.13';
22

33
local volumes = [{ name: 'gopath', temp: {} }];
44
local mounts = [{ name: 'gopath', path: '/go' }];
@@ -65,6 +65,7 @@ local docker(arch) = pipeline('docker-' + arch) {
6565

6666
pipeline('release') {
6767
steps: [
68+
go('fetch-tags', ['git fetch origin --tags']),
6869
make('cross'),
6970
{
7071
name: 'publish',

.drone/drone.yml

+15-7
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ platform:
88

99
steps:
1010
- name: download
11-
image: golang:1.12
11+
image: golang:1.13
1212
commands:
1313
- go mod download
1414
volumes:
1515
- name: gopath
1616
path: /go
1717

1818
- name: lint
19-
image: golang:1.12
19+
image: golang:1.13
2020
commands:
2121
- make lint
2222
volumes:
@@ -26,7 +26,7 @@ steps:
2626
- download
2727

2828
- name: test
29-
image: golang:1.12
29+
image: golang:1.13
3030
commands:
3131
- make test
3232
volumes:
@@ -48,8 +48,16 @@ platform:
4848
arch: amd64
4949

5050
steps:
51+
- name: fetch-tags
52+
image: golang:1.13
53+
commands:
54+
- git fetch origin --tags
55+
volumes:
56+
- name: gopath
57+
path: /go
58+
5159
- name: cross
52-
image: golang:1.12
60+
image: golang:1.13
5361
commands:
5462
- make cross
5563
volumes:
@@ -86,7 +94,7 @@ platform:
8694

8795
steps:
8896
- name: static
89-
image: golang:1.12
97+
image: golang:1.13
9098
commands:
9199
- make static
92100
volumes:
@@ -127,7 +135,7 @@ platform:
127135

128136
steps:
129137
- name: static
130-
image: golang:1.12
138+
image: golang:1.13
131139
commands:
132140
- make static
133141
volumes:
@@ -168,7 +176,7 @@ platform:
168176

169177
steps:
170178
- name: static
171-
image: golang:1.12
179+
image: golang:1.13
172180
commands:
173181
- make static
174182
volumes:

0 commit comments

Comments
 (0)