aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2020-11-06 19:29:02 +0300
committerla-ninpre <leobrekalini@gmail.com>2020-11-06 19:29:02 +0300
commit68652958a5c45ec69e5d04fa0b586ad0051d3942 (patch)
treed90a0442e5fa7e5dc76a68b9eea532ed7efe3236 /Makefile
parent21f109dbd19a7be4e183f2b611ee3a8e1460e746 (diff)
downloadPutnik-68652958a5c45ec69e5d04fa0b586ad0051d3942.tar.gz
Putnik-68652958a5c45ec69e5d04fa0b586ad0051d3942.zip
Makefile: add release target
this is kinda messy, but supposed to work when tag happens.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 16 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index bf521df..a07ae3c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,10 @@
-FONTNAME=Putnik
+FONT_NAME=Putnik
+FONT_VERSION=$(shell git describe --abbrev=4)
+RELEASE=$(FONT_NAME)-$(FONT_VERSION)
OUT_DIR=fonts
-UFO_SRC=sources/$(FONTNAME).ufo
-TTF=fonts/ttf/$(FONTNAME).ttf
-OTF=fonts/otf/$(FONTNAME).otf
+UFO_SRC=sources/$(FONT_NAME).ufo
+TTF=fonts/ttf/$(FONT_NAME).ttf
+OTF=fonts/otf/$(FONT_NAME).otf
all: ttf otf
@@ -14,7 +16,15 @@ otf: $(OTF)
$(OTF): $(UFO_SRC)
fontmake -u $(UFO_SRC) -o otf --output-dir fonts/otf/
+release: release-tar release-zip
+
+release-tar: ttf otf
+ tar -cvf $(RELEASE).tar.gz $(OTF) $(TTF) LICENSE
+
+release-zip: ttf otf
+ zip -j $(RELEASE).zip $(OTF) $(TTF) LICENSE
+
clean:
- -rm $(TTF) $(OTF)
+ -rm $(TTF) $(OTF) $(RELEASE).*
-.PHONY: clean
+.PHONY: all release clean