forked from argenos/zotero-mdnotes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (23 loc) · 947 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
all: Makefile.in
-include Makefile.in
# RELEASE:=$(shell grep em:version install.rdf | head -n 1 | sed -e 's/ *<em:version>//' -e 's/<\/em:version>//')
RELEASE:=$(shell git tag --sort version:refname | tail -n 1)
PREVRELEASE:=$(shell git tag --sort version:refname | tail -n 2 | head -n 1)
mdnotes.xpi: FORCE
rm -rf $@
zip -r $@ content chrome.manifest defaults locale skin install.rdf update.rdf -x \*.DS_Store
mdnotes-%-fx.xpi: mdnotes.xpi
mv $< $@
Makefile.in: install.rdf
echo "all: mdnotes-${RELEASE}-fx.xpi" > Makefile.in
release: mdnotes.xpi
@mv $< mdnotes-$(RELEASE).xpi
# Replace old version with new version in install.rdf and update.rdf
sed -i 's/${PREVRELEASE}/${RELEASE}/g' install.rdf
sed -i 's/${PREVRELEASE}/${RELEASE}/g' update.rdf
# Show commits between the last two tags
# @echo "\nChangelog\n------------"
@git log --pretty=format:"%s" $(PREVRELEASE)..$(RELEASE) > changelog.md
clean:
rm -rf *.xpi
FORCE: