File tree Expand file tree Collapse file tree 3 files changed +29
-16
lines changed Expand file tree Collapse file tree 3 files changed +29
-16
lines changed Original file line number Diff line number Diff line change 11
11
executors :
12
12
cimg-base :
13
13
docker :
14
- - image : cimg/base:2021.11
14
+ - image : cimg/base:2022.03
15
15
16
16
jobs :
17
17
gen :
46
46
configuration_path : continue-generated.yml
47
47
48
48
workflows :
49
- always :
49
+ gen :
50
50
jobs :
51
- - gen
51
+ - gen :
52
+ filters :
53
+ tags :
54
+ only : /^.*$/
Original file line number Diff line number Diff line change @@ -87,18 +87,21 @@ jobs:
87
87
steps :
88
88
- checkout :
89
89
path : ~/src
90
+ - run :
91
+ name : Configure environment
92
+ command : |
93
+ version=$(echo ${CIRCLE_TAG} | sed -e s#^rolling-shutter/##)
94
+ echo >>${BASH_ENV} export VERSION="${version}"
95
+ echo >>${BASH_ENV} export BIN=/tmp/release-bin
90
96
- restore_cache :
91
97
keys :
92
98
- rs-build-go-integration-v3-{{ checksum "go.sum" }}
93
- - run : env VERSION=${CIRCLE_TAG} ./build-release
94
- -
run :
go install github.com/tcnksm/[email protected]
95
- - attach_workspace :
96
- at : ~/share
99
+ - run : ./build-release
100
+ -
run :
go install github.com/tcnksm/[email protected]
97
101
- run :
98
- name : Upload binaries and combined.json
102
+ name : Upload binaries
99
103
command : |
100
- cp ~/share/combined.json bin/
101
- ghr ${CIRCLE_TAG} bin/
104
+ ghr ${CIRCLE_TAG} ${BIN}
102
105
103
106
rs-lint :
104
107
executor : go
@@ -132,14 +135,14 @@ workflows:
132
135
- rs-generate :
133
136
filters :
134
137
tags :
135
- only : /^v\d+\.\d+\.\d+$ /
138
+ only : /.* /
136
139
- rs-build :
137
140
matrix :
138
141
parameters :
139
142
go-version : [go-integration]
140
143
filters :
141
144
tags :
142
- only : /^v\d+\.\d+\.\d+$ /
145
+ only : /.* /
143
146
- publish-release :
144
147
requires :
145
148
- rs-build
@@ -149,7 +152,7 @@ workflows:
149
152
branches :
150
153
ignore : /.*/
151
154
tags :
152
- only : /^v\d+\.\d+\.\d+$/
155
+ only : /^rolling-shutter\/ v\d+\.\d+\.\d+$/
153
156
- rs-lint :
154
157
filters :
155
158
branches :
Original file line number Diff line number Diff line change @@ -3,16 +3,23 @@ set -euo pipefail
3
3
4
4
: " ${GO:= go} "
5
5
: " ${VERSION:= } "
6
- : " ${TARGETS:= linux-amd64 linux-arm linux-arm64 freebsd-amd64 openbsd-amd64 darwin-amd64} "
6
+ : " ${TARGETS:= linux-amd64 linux-arm64 freebsd-amd64 openbsd-amd64 darwin-amd64 darwin-arm64} "
7
+ : " ${BIN:= bin} "
8
+
9
+ function remove_version_prefix() {
10
+ echo " $1 " | sed -e s#^rolling-shutter/# #
11
+ }
7
12
8
13
if [[ -z " ${VERSION} " ]]; then
9
- VERSION=$( git describe --tags --always --abbrev=4 --dirty --match ' rolling-shutter/v*' | sed -e s#^rolling-shutter/ # # )
14
+ VERSION=$( git describe --tags --always --abbrev=4 --dirty --match ' rolling-shutter/v*' )
10
15
fi
11
16
17
+ VERSION=$( remove_version_prefix " $VERSION " )
18
+
12
19
git clean -xfd bin
13
20
for osarch in ${TARGETS} ; do
14
21
IFS=' -' read -r os arch <<< " ${osarch}"
15
- target=bin /rolling-shutter-${os} -${arch} -${VERSION}
22
+ target=${BIN} /rolling-shutter-${os} -${arch} -${VERSION}
16
23
echo " Building ${target} "
17
24
env GOARCH=" ${arch} " GOOS=" ${os} " ${GO} build -o " ${target} " -ldflags " -X github.com/shutter-network/shutter/shuttermint/cmd/shversion.version=${VERSION} " .
18
25
done
You can’t perform that action at this time.
0 commit comments