[#75] Add make
targets policy
and docker/%
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
406c2324d4
commit
e6b662cfa6
2 changed files with 19 additions and 0 deletions
4
Dockerfile
Normal file
4
Dockerfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
FROM golang:1.19
|
||||||
|
|
||||||
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install make openjdk-11-jre -y
|
||||||
|
WORKDIR /work
|
15
Makefile
15
Makefile
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
ANTLR_VERSION="4.13.0"
|
||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
test:
|
test:
|
||||||
@go test ./... -cover
|
@go test ./... -cover
|
||||||
|
@ -29,6 +31,19 @@ format:
|
||||||
@echo "⇒ Processing goimports check"
|
@echo "⇒ Processing goimports check"
|
||||||
@goimports -w ./
|
@goimports -w ./
|
||||||
|
|
||||||
|
policy:
|
||||||
|
@wget -q https://www.antlr.org/download/antlr-${ANTLR_VERSION}-complete.jar -O antlr4-tool.jar
|
||||||
|
@java -Xmx500M -cp "`pwd`/antlr4-tool.jar" "org.antlr.v4.Tool" -o `pwd`/netmap/parser/ -Dlanguage=Go -no-listener -visitor `pwd`/netmap/parser/Query.g4 `pwd`/netmap/parser/QueryLexer.g4
|
||||||
|
|
||||||
|
# Run `make %` in truecloudlab/frostfs-sdk-go container(Golang+Java)
|
||||||
|
docker/%:
|
||||||
|
@docker build -t truecloudlab/frostfs-sdk-go --platform linux/amd64 . > /dev/null
|
||||||
|
@docker run --rm -t \
|
||||||
|
-v `pwd`:/work \
|
||||||
|
-u "$$(id -u):$$(id -g)" \
|
||||||
|
--env HOME=/work \
|
||||||
|
truecloudlab/frostfs-sdk-go make $*
|
||||||
|
|
||||||
# Show this help prompt
|
# Show this help prompt
|
||||||
help:
|
help:
|
||||||
@echo ' Usage:'
|
@echo ' Usage:'
|
||||||
|
|
Loading…
Reference in a new issue