File tree Expand file tree Collapse file tree 2 files changed +20
-13
lines changed Expand file tree Collapse file tree 2 files changed +20
-13
lines changed Original file line number Diff line number Diff line change 75
75
name : Ensure commit messages conform semantic requirements
76
76
command : make semantic RANGE=$(git tag | egrep "^v[0-9]+\.[0-9]+\.[0-9]+" | tail -n1)..HEAD
77
77
- run :
78
+ name : Build release assets and binaries
79
+ command : |
80
+ make release
81
+
82
+ ./dist/assets/lstags-linux/lstags --version
83
+ EXPECTED_RELEASE=$(cat dist/release/TAG)
84
+ ACTUAL_RELEASE=$(./dist/assets/lstags-linux/lstags --version | cut -d" " -f2)
85
+ if [ "${ACTUAL_RELEASE}" != "${EXPECTED_RELEASE}" ]; then
86
+ echo "Release versioning is inconsistent (expected: ${EXPECTED_RELEASE} / actual: ${ACTUAL_RELEASE})" >>/dev/stderr
87
+ exit 1
88
+ fi
89
+ - deploy :
78
90
name : Login to Docker (only for master)
79
91
command : |
80
92
if [ ${CIRCLE_BRANCH} == "master" ]; then
@@ -84,24 +96,15 @@ jobs:
84
96
else
85
97
echo '{}' > docker.json
86
98
fi
87
- - run :
99
+ - deploy :
88
100
name : Login to GitHub (only for master)
89
101
command : |
90
102
if [ ${CIRCLE_BRANCH} == "master" ]; then
91
103
git remote set-url --push origin https://${GITHUB_TOKEN}@github.com/ivanilves/lstags.git
92
104
fi
93
- - run :
105
+ - deploy :
94
106
name : Deploy GitHub release and DockerHub image (only for master)
95
107
command : |
96
- make release
97
-
98
- EXPECTED_RELEASE=$(cat dist/release/TAG)
99
- ACTUAL_RELEASE=$(./dist/assets/lstags-linux/lstags --version | cut -d" " -f2)
100
- if [ "${ACTUAL_RELEASE}" != "${EXPECTED_RELEASE}" ]; then
101
- echo "Release versioning is inconsistent (expected: ${EXPECTED_RELEASE} / actual: ${ACTUAL_RELEASE})" >>/dev/stderr
102
- exit 1
103
- fi
104
-
105
108
if [ ${CIRCLE_BRANCH} == "master" ]; then
106
109
make docker-image DOCKER_TAG=release
107
110
make deploy
Original file line number Diff line number Diff line change @@ -111,10 +111,14 @@ fail-on-errors:
111
111
@echo " ${ERRORS} " | grep . || echo " OK"
112
112
@test ` echo " ${ERRORS} " | grep . | wc -l` -eq 0
113
113
114
+ ./dist/assets/lstags-linux/lstags : export GOOS:=linux
115
+ ./dist/assets/lstags-linux/lstags :
116
+ mkdir -p dist/assets/lstags-linux; \
117
+ go build -mod=vendor -ldflags ' -s -w' -a -tags netgo -installsuffix netgo -o dist/assets/lstags-linux/lstags
118
+
114
119
docker-image : DOCKER_REPO:=ivanilves/lstags
115
120
docker-image : DOCKER_TAG:=latest
116
- docker-image : GOOS:=linux
117
- docker-image : build
121
+ docker-image : ./dist/assets/lstags-linux/lstags
118
122
docker-image :
119
123
@docker image build --no-cache -t ${DOCKER_REPO} :${DOCKER_TAG} .
120
124
You can’t perform that action at this time.
0 commit comments