diff --git a/.circleci/config.yml b/.circleci/config.yml index 298d362..6827339 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,5 @@ version: 2 -stages: +jobs: build: machine: image: circleci/classic:201711-01 diff --git a/build_update.sh b/build_update.sh index fc0177d..a53ff6b 100755 --- a/build_update.sh +++ b/build_update.sh @@ -4,11 +4,14 @@ set -e -base_url=$(curl -s -I https://github.com/drud/build-tools/releases/latest | awk '/^Location/ {gsub(/[\n\r]/,"",$2); printf "%s", $2}') -tag=${base_url##*/} +LATEST_RELEASE=$(curl -L -s -H 'Accept: application/json' https://github.com/drud/build-tools/releases/latest) +# The releases are returned in the format {"id":3622206,"tag_name":"hello-1.0.0.11",...}, we have to extract the tag_name. +LATEST_VERSION=$(echo $LATEST_RELEASE | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') +URL="https://github.com/drud/build-tools/releases/download/$LATEST_VERSION" +tag=${LATEST_VERSION} tarball_url="https://github.com/drud/build-tools/archive/$tag.tar.gz" -internal_name=build-tools-$tag +internal_name=build-tools-${tag#v} local_file=/tmp/$internal_name.tgz # If there is a current build-tools, get permission and remove diff --git a/makefile_components/base_build_go.mak b/makefile_components/base_build_go.mak index 9ccfbf3..b5e7a42 100644 --- a/makefile_components/base_build_go.mak +++ b/makefile_components/base_build_go.mak @@ -35,7 +35,7 @@ GOFILES = $(shell find $(SRC_DIRS) -name "*.go") BUILD_OS = $(shell go env GOHOSTOS) -BUILD_IMAGE ?= drud/golang-build-container:v1.14.0 +BUILD_IMAGE ?= drud/golang-build-container:v1.14.2 BUILD_BASE_DIR ?= $(PWD)