diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..178135c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/dist/ diff --git a/Makefile b/Makefile index 8c96923..58e6581 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,30 @@ -Q_EXTENSION_DIR = extension -Q_HOST_DIR = host +EXTENSION_DIR = extension +HOST_DIR = host +DST_DIR = dist + +VERSION = 0.0.0 .PHONY: release -release: - $(MAKE) --directory=$(Q_EXTENSION_DIR) release - $(MAKE) --directory=$(Q_HOST_DIR) release-all +release: clean + $(MAKE) --directory=$(EXTENSION_DIR) release VERSION=$(VERSION) + $(MAKE) --directory=$(HOST_DIR) release-all VERSION=$(VERSION) + + cp $(EXTENSION_DIR)/dist/* $(DST_DIR) + cp $(HOST_DIR)/dist/* $(DST_DIR) + mv $(DST_DIR)/*.xpi $(DST_DIR)/q-extension.xpi + ls -l $(DST_DIR) + + gh release create v$(VERSION) $(DST_DIR)/* \ + --draft .PHONY: all all: - $(MAKE) --directory=$(Q_HOST_DIR) all + $(MAKE) --directory=$(HOST_DIR) all .PHONY: clean clean: - $(MAKE) --directory=$(Q_EXTENSION_DIR) clean - $(MAKE) --directory=$(Q_HOST_DIR) clean + $(MAKE) --directory=$(EXTENSION_DIR) clean + $(MAKE) --directory=$(HOST_DIR) clean + rm -rf $(DST_DIR)/* .DEFAULT: all