2019-01-23 11:11:55 +03:00
|
|
|
|
|
|
|
OUT_DIR=output
|
|
|
|
MOD_ZIP=$(OUT_DIR)/mapserver-mod.zip
|
2019-03-29 12:18:23 +03:00
|
|
|
VERSION=git-$(shell git rev-parse HEAD)
|
2019-01-23 11:11:55 +03:00
|
|
|
|
2019-04-02 20:12:53 +03:00
|
|
|
all: builder_image $(OUT_DIR) $(MOD_ZIP)
|
2019-03-29 11:07:06 +03:00
|
|
|
# build all with the docker image
|
|
|
|
sudo docker run --rm -it\
|
|
|
|
-v $(shell pwd)/server/:/app\
|
|
|
|
-v mapserver-volume:/root/go\
|
|
|
|
-w /app\
|
|
|
|
mapserver-builder\
|
2019-04-04 11:59:48 +03:00
|
|
|
make test jshint all VERSION=$(VERSION)
|
2019-03-29 11:07:06 +03:00
|
|
|
# copy generated files to output dir
|
2019-01-23 11:11:55 +03:00
|
|
|
cp server/output/* $(OUT_DIR)/
|
|
|
|
|
2019-04-02 20:12:53 +03:00
|
|
|
builder_image:
|
|
|
|
# build the docker image with all dependencies
|
|
|
|
$(MAKE) -C docker_builder build
|
|
|
|
|
|
|
|
|
2019-01-23 11:11:55 +03:00
|
|
|
$(OUT_DIR):
|
|
|
|
mkdir $@
|
|
|
|
|
2019-04-02 20:12:53 +03:00
|
|
|
$(MOD_ZIP): builder_image $(OUT_DIR)
|
2019-03-29 12:42:15 +03:00
|
|
|
# lint with luacheck
|
|
|
|
sudo docker run --rm -it\
|
|
|
|
-v $(shell pwd)/mapserver_mod/mapserver:/app\
|
|
|
|
-w /app\
|
|
|
|
mapserver-builder\
|
|
|
|
luacheck .
|
|
|
|
# zip mod
|
2019-01-24 16:07:20 +03:00
|
|
|
zip -r $(OUT_DIR)/mapserver-mod.zip mapserver_mod
|
2019-01-23 11:11:55 +03:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(OUT_DIR)
|
|
|
|
$(MAKE) -C server clean
|