From 89f03cd8c983168cef83d734ea1105fe88b343e5 Mon Sep 17 00:00:00 2001 From: felix Date: Thu, 11 Oct 2018 13:22:04 +0200 Subject: [PATCH] Add a hack to be able to release pre-releases --- .circleci/config.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4d1518b..4f10289 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 jobs: test: docker: - - image: cloudradario/go-build:0.0.5 + - image: cloudradario/go-build:0.0.6 working_directory: /go/src/github.com/cloudradar-monitoring/cagent steps: - checkout @@ -11,7 +11,7 @@ jobs: gorelease: docker: - - image: cloudradario/go-build:0.0.5 + - image: cloudradario/go-build:0.0.6 working_directory: /go/src/github.com/cloudradar-monitoring/cagent steps: # Setup our ssh key from env var to be able to connect to Windows VM @@ -20,6 +20,11 @@ jobs: - checkout # Build binaries - run: goreleaser --rm-dist + # Since goreleaser can't handle pre-releases as we need it we mark it later as pre-release using github-release + - run: + shell: /bin/bash + command: | + [[ ${CIRCLE_TAG} =~ (-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$ ]] && github-release edit --user cloudradar-monitoring --repo cagent --tag ${CIRCLE_TAG} -p # Create remote build dir - run: ssh -i /tmp/id_win_ssh -oStrictHostKeyChecking=no hero@13.80.137.211 mkdir -p /cygdrive/c/Users/hero/cagent_ci/build_msi/${CIRCLE_BUILD_NUM}/dist # Copy exe files to Windows VM for bundingling and signing