Skip to content

Commit

Permalink
Merge pull request #335 from teharrison/master
Browse files Browse the repository at this point in the history
fix sed replacement
  • Loading branch information
teharrison authored Jul 24, 2017
2 parents f7c9f99 + cc177be commit faada30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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} && \
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit faada30

Please sign in to comment.