Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Bump golang to latest and fix build_update.sh (#71)
Browse files Browse the repository at this point in the history
* Bump golang to v1.14.2

* Fix build_update.sh, which has been broken a long time
Github api must have changed...

* Fix circleci stages -> jobs
  • Loading branch information
rfay authored May 14, 2020
1 parent eba821d commit fe9e385
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 2
stages:
jobs:
build:
machine:
image: circleci/classic:201711-01
Expand Down
9 changes: 6 additions & 3 deletions build_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion makefile_components/base_build_go.mak
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit fe9e385

Please sign in to comment.