Skip to content

Commit bfcf958

Browse files
committed
Add unzip-to-build make target
This simplifies distribution using downloaded artifacts from CI
1 parent 3727b80 commit bfcf958

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ STRIP ?= strip
1212
CODESIGN ?= codesign
1313
# Configurable paths
1414
NDK_TOOLCHAIN_BIN ?=
15+
ZIP_URL ?=
16+
ZIP_URL_DOWNLOAD_OUTPUT ?= /tmp/godot-lua-pluginscript-unzip-to-build.zip
1517

1618
CFLAGS += -std=c11 "-I$(CURDIR)/lib/godot-headers" "-I$(CURDIR)/lib/high-level-gdnative" "-I$(CURDIR)/lib/luajit/src"
1719
ifeq ($(DEBUG), 1)
@@ -173,7 +175,7 @@ build/project.godot: src/tools/project.godot | build
173175
cp $< $@
174176

175177
# Phony targets
176-
.PHONY: clean dist docs test plugin
178+
.PHONY: clean dist docs test unzip-to-build
177179
clean:
178180
$(RM) -r build/*/ plugin/luasrcdiet/*
179181

@@ -185,6 +187,15 @@ docs:
185187
test: $(DIST_DEST) build/project.godot
186188
$(GODOT_BIN) --path build --no-window --quit --script "$(CURDIR)/src/test/init.lua"
187189

190+
unzip-to-build:
191+
ifneq (,$(filter http://% https://%,$(ZIP_URL)))
192+
curl -L $(ZIP_URL) -o $(ZIP_URL_DOWNLOAD_OUTPUT)
193+
cd build && unzip -u $(ZIP_URL_DOWNLOAD_OUTPUT)
194+
else
195+
cd build && unzip -u $(ZIP_URL)
196+
endif
197+
198+
# Miscelaneous targets
188199
plugin: $(LUASRCDIET_DEST)
189200

190201
native-luajit: MACOSX_DEPLOYMENT_TARGET ?= 11.0

0 commit comments

Comments
 (0)