From cc177be9318e2daaefec011ccaf7c093297e1460 Mon Sep 17 00:00:00 2001 From: Travis Harrison Date: Mon, 24 Jul 2017 11:28:27 -0500 Subject: [PATCH] fix sed replacement --- Dockerfile | 2 +- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 39dc597f..15952ce5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ RUN mkdir -p /var/log/shock /usr/local/shock ${DIR} # set version RUN cd ${DIR} && \ VERSION=$(cat VERSION) && \ - sed -i "s/\[% VERSION %\]/${VERSION}/" shock-server/main.go + sed -i "s/\[% VERSION %\]/${VERSION}/" shock-server/conf/conf.go # compile RUN cd ${DIR} && \ diff --git a/Makefile b/Makefile index eed85139..d38fc007 100644 --- a/Makefile +++ b/Makefile @@ -46,8 +46,8 @@ get: cp $(GOPATH)/src/$(SRCDIR)/shock-server/site/wiki/* $(GOPATH)/src/$(SRCDIR)/shock-server/site/ version: - for i in `cat src/$(SRCDIR)/VERSION`; do sed "s/\[% VERSION %\]/$$i/" < src/$(SRCDIR)/shock-server/main.go > src/$(SRCDIR)/shock-server/main.version.go ; done - mv src/$(SRCDIR)/shock-server/main.version.go src/$(SRCDIR)/shock-server/main.go + VER=`cat src/$(SRCDIR)/VERSION` + sed -i "s/\[% VERSION %\]/$$VER/" src/$(SRCDIR)/shock-server/conf/conf.go docs: @echo '#Shock wiki\n\n[Home](index.md)' > $(GOPATH)/src/$(SRCDIR)/shock-server/site/navigation.md