release 0.3.2

This commit is contained in:
2026-08-11 11:23:04 -03:00
parent 5176301116
commit 825fedb366
6 changed files with 19 additions and 8 deletions

View File

@@ -30,6 +30,7 @@
# make xpi # package Firefox -> dist/logsdu-<version>-firefox.xpi
# make crx # package Chrome -> dist/logsdu-<version>-chrome.zip
# make packages # both of the above (same as plain "make")
# make prune # drop packages left in dist/ by earlier versions
# make clean # remove build/, dist/ and stray packages
# make distclean # clean, plus node_modules/
#
@@ -63,7 +64,7 @@ DIST := dist
XPI := $(DIST)/$(EXT_ID)-$(VERSION)-firefox.xpi
CRX := $(DIST)/$(EXT_ID)-$(VERSION)-chrome.zip
.PHONY: all firefox chrome typecheck test smoke xpi crx packages clean \
.PHONY: all firefox chrome typecheck test smoke prune xpi crx packages clean \
distclean check-deps
# The default does the lot: build both browsers and package both. Packaging is
@@ -106,10 +107,21 @@ chrome: typecheck
@echo "Select the folder itself; Chrome wants the directory holding manifest.json."
@echo
# Drop packages left over from earlier versions.
#
# Package names carry their version, so a bump does not overwrite the previous
# build -- without this, dist/ accumulates every version ever built and it
# becomes easy to upload the wrong file to a store. dist/ is regenerated
# output: keep signed downloads from AMO somewhere else, not here.
prune:
@mkdir -p $(DIST)
@find $(DIST) -maxdepth 1 -type f \( -name '$(EXT_ID)-*.xpi' -o -name '$(EXT_ID)-*.zip' \) \
! -name '$(notdir $(XPI))' ! -name '$(notdir $(CRX))' \
-print -delete | sed 's/^/removed stale package: /'
# An .xpi is just a zip of the extension directory, with the manifest at the
# top level rather than inside a wrapper folder.
xpi: firefox
@mkdir -p $(DIST)
xpi: firefox prune
rm -f $(XPI)
cd $(FIREFOX_DIR) && zip -qr $(CURDIR)/$(XPI) .
@echo
@@ -129,8 +141,7 @@ xpi: firefox
@echo
# The Chrome Web Store takes a plain zip, and does the packing into .crx itself.
crx: chrome
@mkdir -p $(DIST)
crx: chrome prune
rm -f $(CRX)
cd $(CHROME_DIR) && zip -qr $(CURDIR)/$(CRX) .
@echo