From a5e3d7d64557f94ad5fddcfa64ec8e57abf0adb4 Mon Sep 17 00:00:00 2001 From: Alexander Bezzubov Date: Wed, 24 Oct 2018 08:26:08 +0200 Subject: [PATCH 1/3] ci: move to modeern src-d/ci v1 Otherwise, \w current version 'make pakcages' returns 0 even if the build fails e.g. https://travis-ci.org/src-d/enry/jobs/445378508 Signed-off-by: Alexander Bezzubov --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 335cd2c..8ae908d 100644 --- a/Makefile +++ b/Makefile @@ -3,12 +3,12 @@ PROJECT = enry COMMANDS = cmd/enry # Including ci Makefile -MAKEFILE = Makefile.main -CI_REPOSITORY = https://github.com/src-d/ci.git -CI_FOLDER = .ci +CI_REPOSITORY ?= https://github.com/src-d/ci.git +CI_BRANCH ?= v1 +CI_PATH ?= .ci +MAKEFILE := $(CI_PATH)/Makefile.main $(MAKEFILE): - @git clone --quiet $(CI_REPOSITORY) $(CI_FOLDER); \ - cp $(CI_FOLDER)/$(MAKEFILE) .; + git clone --quiet --depth 1 -b $(CI_BRANCH) $(CI_REPOSITORY) $(CI_PATH); -include $(MAKEFILE) # Docsrv: configure the languages whose api-doc can be auto generated From 5367f86f92cefbfdefe6a9196449b309ac7f69fa Mon Sep 17 00:00:00 2001 From: Alexander Bezzubov Date: Wed, 24 Oct 2018 08:44:00 +0200 Subject: [PATCH 2/3] ci: make packages fetch deps Signed-off-by: Alexander Bezzubov --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 169e813..ca44c4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,6 +58,8 @@ jobs: - name: 'linux packages' stage: release + install: + - go get -v -t ./... script: make packages deploy: provider: releases From 03da1550694e09ec8f9741930a03fce486d94f50 Mon Sep 17 00:00:00 2001 From: Alexander Bezzubov Date: Wed, 24 Oct 2018 08:54:55 +0200 Subject: [PATCH 3/3] ci: explicitly enable deployment on tag As per https://docs.travis-ci.com/user/deployment/#conditional-releases-with-on it otherwise results in builds like https://travis-ci.org/src-d/enry/jobs/445378509 ``` Skipping a deployment with the release provider because this branch is not permitted: v1.6.7 ``` So either it needs to be `all_branches: true` or `tags: true` to work. Signed-off-by: Alexander Bezzubov --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index ca44c4a..0563801 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,6 +68,7 @@ jobs: file_glob: true file: build/*.tar.gz skip_cleanup: true + tags: true - name: 'linux shared lib' stage: release @@ -81,6 +82,7 @@ jobs: file: - ./.shared/linux-x86-64/libenry.so skip_cleanup: true + tags: true - name: 'macOS shared lib' stage: release @@ -103,6 +105,7 @@ jobs: secure: $GITHUB_TOKEN file: ./.shared/darwin/libenry.dylib skip_cleanup: true + tags: true - name: 'java: publish to maven' stage: publish @@ -137,3 +140,4 @@ jobs: file_glob: true file: ./target/enry-java*.jar skip_cleanup: true + tags: true