custom-script-extension-linux/Makefile

29 строки
981 B
Makefile
Исходник Постоянная ссылка Обычный вид История

BINDIR=bin
BIN=custom-script-extension
2021-09-28 22:07:25 +03:00
BIN_ARM64=custom-script-extension-arm64
BUNDLEDIR=bundle
BUNDLE=custom-script-extension.zip
bundle: clean binary
@mkdir -p $(BUNDLEDIR)
2021-09-28 22:07:25 +03:00
zip -r ./$(BUNDLEDIR)/$(BUNDLE) ./$(BINDIR)
2016-08-01 23:51:52 +03:00
zip -j ./$(BUNDLEDIR)/$(BUNDLE) ./misc/HandlerManifest.json
2016-08-02 09:14:15 +03:00
zip -j ./$(BUNDLEDIR)/$(BUNDLE) ./misc/manifest.xml
binary: clean
if [ -z "$$GOPATH" ]; then \
echo "GOPATH is not set"; \
exit 1; \
fi
GOOS=linux GOARCH=amd64 govvv build -v \
-ldflags "-X main.Version=`grep -E -m 1 -o '<Version>(.*)</Version>' misc/manifest.xml | awk -F">" '{print $$2}' | awk -F"<" '{print $$1}'`" \
-o $(BINDIR)/$(BIN) ./main
2021-09-28 22:07:25 +03:00
GOOS=linux GOARCH=arm64 govvv build -v \
-ldflags "-X main.Version=`grep -E -m 1 -o '<Version>(.*)</Version>' misc/manifest.xml | awk -F">" '{print $$2}' | awk -F"<" '{print $$1}'`" \
-o $(BINDIR)/$(BIN_ARM64) ./main
cp ./misc/custom-script-shim ./$(BINDIR)
clean:
rm -rf "$(BINDIR)" "$(BUNDLEDIR)"
.PHONY: clean binary