From bdfe3ea25226b64675189ef64af2fdd5c2ad129e Mon Sep 17 00:00:00 2001 From: Demitri Swan Date: Sat, 30 Nov 2019 20:29:05 +0000 Subject: [PATCH] issue-11: Fix dev environment --- Makefile | 2 +- docker/Dockerfile | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 956209a..fb2042a 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ SHELL = /bin/bash # Origin does not point to https://github.com/digitalocean/prometheus-client-c.git in TravisCI so we must add a new # remote for fetching. Fetch master, diff on the filenames and look for C files. If no changes to C files are made, skip # the build. -CHANGED_FILES = $(shell git remote add ci https://github.com/digitalocean/prometheus-client-c.git > /dev/null 2>&1; git fetch ci master > /dev/null 2>&1; git diff --name-only ci/master | egrep '.*[c|h]$$') +CHANGED_FILES = $(shell git remote add ci https://github.com/digitalocean/prometheus-client-c.git > /dev/null 2>&1; git fetch ci master > /dev/null 2>&1; git diff --name-only ci/master | egrep -v '.*\.md$$') ifneq ($(shell echo "x${CHANGED_FILES}x" | sed 's/\n\t //'), xx) default: build_and_test diff --git a/docker/Dockerfile b/docker/Dockerfile index a27d2e7..48b0e52 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,8 +5,7 @@ RUN apt-get update && \ apt-get install -y curl tar build-essential git pkg-config gdb valgrind gcc libmicrohttpd-dev doxygen graphviz && \ curl -L https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz 2> /dev/null | tar xzvf - -C /usr/local && \ mkdir -p /gopath/{src,bin} && \ - echo 'export GOPATH=/gopath' > /root/.bash_profile && \ - echo 'export PATH=$PATH:/usr/local/go/bin:/gopath/bin' > /root/.bash_profile && \ + printf 'export GOPATH=/gopath\nexport PATH=$PATH:/usr/local/go/bin:/gopath/bin\n' > /root/.bash_profile && \ printf '#!/usr/bin/env bash\nsource /root/.bash_profile\nexec /bin/bash $@\n' > /entrypoint && \ chmod +x /entrypoint && \ GOPATH=/gopath /usr/local/go/bin/go get github.com/prometheus/prom2json && \