Skip to content

Commit 9dccbaa

Browse files
authored
Merge pull request #3636 from dmcgowan/fix-cri-darwin-release
[CI] fix darwin build for cri release
2 parents 5403e55 + 3db5a5a commit 9dccbaa

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

.travis.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ after_success:
115115

116116
before_deploy:
117117
- make release
118+
- if [ "$TRAVIS_GOOS" = "linux" ]; then make cri-release; fi
118119

119120
deploy:
120121
- provider: releases
@@ -145,7 +146,8 @@ deploy:
145146
file:
146147
- releases/cri/*.tar.gz
147148
- releases/cri/*.tar.gz.sha256
148-
# TODO: only deploy on tag after testing.
149-
#on:
150-
# repo: containerd/containerd
151-
# tags: true
149+
on:
150+
repo: containerd/containerd
151+
# TODO: switch `tags: true` after validating on master
152+
branch: master
153+
condition: $TRAVIS_GOOS = linux

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,20 @@ install-man:
216216
@echo "$(WHALE) $@"
217217
$(foreach manpage,$(addprefix man/,$(MANPAGES)), $(call installmanpage,$(manpage),$(subst .,,$(suffix $(manpage))),$(notdir $(manpage))))
218218

219-
release: $(BINARIES)
219+
releases/$(RELEASE).tar.gz: $(BINARIES)
220220
@echo "$(WHALE) $@"
221221
@rm -rf releases/$(RELEASE) releases/$(RELEASE).tar.gz
222222
@install -d releases/$(RELEASE)/bin
223223
@install $(BINARIES) releases/$(RELEASE)/bin
224-
@cd releases/$(RELEASE) && tar -czf ../$(RELEASE).tar.gz *
224+
@tar -czf releases/$(RELEASE).tar.gz -C releases/$(RELEASE) bin
225+
@rm -rf releases/$(RELEASE)
226+
227+
release: $(BINARIES) releases/$(RELEASE).tar.gz
228+
@echo "$(WHALE) $@"
225229
@cd releases && sha256sum $(RELEASE).tar.gz >$(RELEASE).tar.gz.sha256sum
230+
231+
cri-release: $(BINARIES) releases/$(RELEASE).tar.gz
232+
@echo "$(WHALE) $@"
226233
@VERSION=$(VERSION:v%=%) script/release/release-cri
227234

228235
clean: ## clean up binaries

0 commit comments

Comments
 (0)