File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ FROM golang:1.20
1010
1111COPY . /go/src/github.com/ovh/utask
1212WORKDIR /go/src/github.com/ovh/utask
13- RUN make re && \
14- mv hack/Makefile-child Makefile && \
13+ RUN make re && make makefile && \
1514 mkdir -p /app/plugins /app/templates /app/config /app/init /app/static/dashboard && \
1615 mv hack/wait-for-it/wait-for-it.sh /wait-for-it.sh && \
17- chmod +x /wait-for-it.sh
16+ chmod +x /wait-for-it.sh && \
17+ go clean -cache && rm -rf /go/pkg/*
1818WORKDIR /app
1919
2020COPY --from=js-builder /home/node/ui/dashboard/dist/utask-ui/ /app/static/dashboard/
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ ifndef VERSION
1515 VERSION = $(shell git describe --abbrev=3 --tags $(git rev-list --tags --max-count=1))-dev
1616endif
1717
18- LAST_COMMIT = ` git rev-parse HEAD `
18+ LAST_COMMIT := $( shell git rev-parse HEAD)
1919VERSION_PKG = github.com/ovh/utask
2020
2121DOCKER = 0
9393
9494package :
9595
96- .PHONY : all clean test re package release test test-travis test-docker run-test-stack run-test-stack-docker run-goreleaser docker
96+ makefile :
97+ sed -e ' s/VERSION=/VERSION=${VERSION}/g' hack/Makefile-child | sed -e ' s/LAST_COMMIT=/LAST_COMMIT=${LAST_COMMIT}/g' > | Makefile
98+
99+ .PHONY : all clean test re package release test test-travis test-docker run-test-stack run-test-stack-docker run-goreleaser docker makefile
Original file line number Diff line number Diff line change 1+ LAST_COMMIT=
2+ VERSION=
3+
14all:
25 GO111MODULE=on go get -d -v ./...
3- GO111MODULE=on go build -o utask ./cmd/utask
6+ GO111MODULE=on go build -ldflags "-X github.com/ovh/utask.Commit=${LAST_COMMIT} -X github.com/ovh/utask.Version=${VERSION}" - o utask ./cmd/utask
47 for p in $$(ls ./plugins); do if [ -d ./plugins/$$p ]; then GO111MODULE=on go build --buildmode=plugin -o ./plugins/$$p.so ./plugins/$$p/*.go; fi; done
58 for p in $$(ls ./init); do if [ -d ./init/$$p ]; then GO111MODULE=on go build --buildmode=plugin -o ./init/$$p.so ./init/$$p/*.go; fi; done
69
You can’t perform that action at this time.
0 commit comments