File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed
Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ ARG VERSION=0.0.1
4444ARG TYPE=srv
4545ARG TARGET=account
4646
47- RUN pkger -o $TYPE/$TARGET -include /deploy/bases/micros/$TARGET-$TYPE/ config
47+ RUN pkger -o $TYPE/$TARGET -include /config
4848RUN go build -a \
4949 -ldflags="-w -s -linkmode external -extldflags '-static' $(govvv -flags -version ${VERSION} -pkg $(go list ./shared/config) )" \
5050 -o /app ./$TYPE/$TARGET/main.go ./$TYPE/$TARGET/plugin.go
Original file line number Diff line number Diff line change @@ -115,12 +115,12 @@ endif
115115 for _target in $${type}/*/; do \
116116 temp=$${_target%%/}; target=$${temp# */}; \
117117 echo "\tPackaging config for $${target}-$${type}"; \
118- ${GOPATH}/bin/pkger -o $${type}/$${target} -include /deploy/bases/micros/$${target}-$${type}/ config; \
118+ ${GOPATH}/bin/pkger -o $${type}/$${target} -include /config; \
119119 done \
120120 done \
121121 else \
122122 echo "Packaging config for ${TARGET}-${TYPE}..."; \
123- ${GOPATH}/bin/pkger -o ${TYPE}/${TARGET} -include /deploy/bases/micros/${TARGET}-${TYPE}/ config ; \
123+ ${GOPATH}/bin/pkger -o ${TYPE}/${TARGET} -include /config ; \
124124 fi
125125
126126build build-% : pkger-%
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ WORKDIR /src
3333COPY ./go.mod ./go.sum ./
3434# Get dependancies - will also be cached if we won't change mod/sum
3535RUN go mod download && \
36- GO111MODULE=off go get github.com/ahmetb/govvv
36+ GO111MODULE=off go get github.com/ahmetb/govvv && \
37+ go install github.com/markbates/pkger/cmd/pkger
3738
3839# COPY the source code as the last step
3940COPY ./ ./
@@ -43,6 +44,7 @@ ARG VERSION=0.0.1
4344ARG TYPE=srv
4445ARG TARGET=account
4546
47+ RUN pkger -o $TYPE/$TARGET -include /config
4648RUN go build -a \
4749 -ldflags="-w -s -linkmode external -extldflags '-static' $(govvv -flags -version ${VERSION} -pkg $(go list ./shared/config) )" \
4850 -o /app ./$TYPE/$TARGET/main.go ./$TYPE/$TARGET/plugin.go
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ WORKDIR /src
3131COPY ./go.mod ./go.sum ./
3232# Get dependancies - will also be cached if we won't change mod/sum
3333RUN go mod download && \
34- GO111MODULE=off go get github.com/ahmetb/govvv
34+ GO111MODULE=off go get github.com/ahmetb/govvv && \
35+ go install github.com/markbates/pkger/cmd/pkger
3536
3637# COPY the source code as the last step
3738COPY ./ ./
@@ -41,6 +42,7 @@ ARG VERSION=0.0.1
4142ARG TYPE=srv
4243ARG TARGET=account
4344
45+ RUN pkger -o $TYPE/$TARGET -include /config
4446RUN go build -a \
4547 -ldflags="-w -s $(govvv -flags -version ${VERSION} -pkg $(go list ./shared/config) )" \
4648 -o /app ./$TYPE/$TARGET/main.go ./$TYPE/$TARGET/plugin.go
You can’t perform that action at this time.
0 commit comments