Skip to content

Commit faada30

Browse files
authored
Merge pull request #335 from teharrison/master
fix sed replacement
2 parents f7c9f99 + cc177be commit faada30

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN mkdir -p /var/log/shock /usr/local/shock ${DIR}
1515
# set version
1616
RUN cd ${DIR} && \
1717
VERSION=$(cat VERSION) && \
18-
sed -i "s/\[% VERSION %\]/${VERSION}/" shock-server/main.go
18+
sed -i "s/\[% VERSION %\]/${VERSION}/" shock-server/conf/conf.go
1919

2020
# compile
2121
RUN cd ${DIR} && \

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ get:
4646
cp $(GOPATH)/src/$(SRCDIR)/shock-server/site/wiki/* $(GOPATH)/src/$(SRCDIR)/shock-server/site/
4747

4848
version:
49-
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
50-
mv src/$(SRCDIR)/shock-server/main.version.go src/$(SRCDIR)/shock-server/main.go
49+
VER=`cat src/$(SRCDIR)/VERSION`
50+
sed -i "s/\[% VERSION %\]/$$VER/" src/$(SRCDIR)/shock-server/conf/conf.go
5151

5252
docs:
5353
@echo '#Shock wiki\n\n[Home](index.md)' > $(GOPATH)/src/$(SRCDIR)/shock-server/site/navigation.md

0 commit comments

Comments
 (0)