Skip to content

Commit

Permalink
Prepare a release script
Browse files Browse the repository at this point in the history
  • Loading branch information
soulim committed Dec 16, 2022
1 parent 30cfa5e commit d575962
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist/
28 changes: 20 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d575962

Please sign in to comment.