1
1
mirror of https://github.com/rsms/inter.git synced 2024-11-26 23:56:59 +03:00

release v1.1

This commit is contained in:
Rasmus Andersson 2017-08-22 12:46:29 -07:00
parent 06fd775cce
commit eda835f2f2
16 changed files with 59 additions and 13 deletions

View File

@ -7,6 +7,8 @@
# #
all: all_web all_otf all: all_web all_otf
VERSION := $(shell misc/version.py)
# generated.make is automatically generated by init.sh and defines depenencies for # generated.make is automatically generated by init.sh and defines depenencies for
# all styles and alias targets # all styles and alias targets
include build/etc/generated.make include build/etc/generated.make
@ -56,8 +58,11 @@ build/%.woff: build/%.ttf
# build/%.eot: build/%.ttf # build/%.eot: build/%.ttf
# ttf2eot "$<" > "$@" # ttf2eot "$<" > "$@"
# TTF -> zip ZIP_FILE_DIST := build/release/Interface-${VERSION}.zip
zip: all ZIP_FILE_DEV := build/release/Interface-${VERSION}-$(shell git rev-parse --short=10 HEAD).zip
# zip intermediate
build/.zip.zip: all
@rm -rf build/.zip @rm -rf build/.zip
@rm -f build/.zip.zip @rm -f build/.zip.zip
@mkdir -p \ @mkdir -p \
@ -65,17 +70,42 @@ zip: all
"build/.zip/Interface (hinted TTF)" \ "build/.zip/Interface (hinted TTF)" \
"build/.zip/Interface (TTF)" \ "build/.zip/Interface (TTF)" \
"build/.zip/Interface (OTF)" "build/.zip/Interface (OTF)"
cp -a build/dist/*.woff build/dist/*.woff2 "build/.zip/Interface (web)/" @cp -a build/dist/*.woff build/dist/*.woff2 "build/.zip/Interface (web)/"
cp -a build/dist/*.ttf "build/.zip/Interface (hinted TTF)/" @cp -a build/dist/*.ttf "build/.zip/Interface (hinted TTF)/"
cp -a build/dist-unhinted/*.ttf "build/.zip/Interface (TTF)/" @cp -a build/dist-unhinted/*.ttf "build/.zip/Interface (TTF)/"
cp -a build/dist-unhinted/*.otf "build/.zip/Interface (OTF)/" @cp -a build/dist-unhinted/*.otf "build/.zip/Interface (OTF)/"
cp -a misc/doc/install-*.txt "build/.zip/" @cp -a misc/doc/install-*.txt "build/.zip/"
cd build/.zip && zip -v -X -r "../../build/.zip.zip" * cd build/.zip && zip -v -X -r "../../build/.zip.zip" * >/dev/null && cd ../..
@mkdir -p build/release
@mv -f build/.zip.zip build/release/Interface-`date '+%Y%m%d'`.zip
@echo write build/release/Interface-`date '+%Y%m%d'`.zip
@rm -rf build/.zip @rm -rf build/.zip
# zip
build/release/Interface-%.zip: build/.zip.zip
@mkdir -p "$(shell dirname "$@")"
@mv -f "$<" "$@"
@echo write "$@"
zip: ${ZIP_FILE_DEV}
zip_dist: ${ZIP_FILE_DIST}
dist:
@echo "Creating distribution for version ${VERSION}"
@if [ -f "${ZIP_FILE_DIST}" ]; \
then echo "${ZIP_FILE_DIST} already exists. Bump version or remove the zip file to continue." >&2; \
exit 1; \
fi
@$(MAKE) zip_dist
rm -rf docs/font-files
mkdir docs/font-files
cp -a build/dist/*.woff build/dist/*.woff2 docs/font-files/
@echo "——————————————————————————————————————————————————————————————————"
@echo ""
@echo "Next step:"
@echo " Create new release with ${ZIP_FILE_DIST} at"
@echo ""
@echo " https://github.com/rsms/interface/releases/new?tag=v${VERSION}"
@echo ""
@echo "——————————————————————————————————————————————————————————————————"
install_ttf: all_ttf install_ttf: all_ttf
@echo "Installing TTF files locally at ~/Library/Fonts/Interface" @echo "Installing TTF files locally at ~/Library/Fonts/Interface"
rm -rf ~/Library/Fonts/Interface rm -rf ~/Library/Fonts/Interface
@ -103,4 +133,4 @@ _local/UnicodeData.txt:
clean: clean:
rm -vrf build/tmp/* build/dist/Interface-*.* rm -vrf build/tmp/* build/dist/Interface-*.*
.PHONY: all web clean install install_otf install_ttf deploy zip glyphinfo .PHONY: all web clean install install_otf install_ttf deploy zip zip_dist dist glyphinfo

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 728 KiB

After

Width:  |  Height:  |  Size: 729 KiB

16
misc/version.py Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env python
# encoding: utf8
from __future__ import print_function
import os, sys
from collections import OrderedDict
from ConfigParser import RawConfigParser
def main():
srcDir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'src')
config = RawConfigParser(dict_type=OrderedDict)
config.read(os.path.join(srcDir, 'fontbuild.cfg'))
sys.stdout.write(config.get('main', 'version'))
if __name__ == '__main__':
main()

View File

@ -1,6 +1,6 @@
[main] [main]
version: 1.0 version: 1.1
foundry: rsms foundry: rsms
foundryurl: https://rsms.me/ foundryurl: https://rsms.me/
designer: Rasmus Andersson designer: Rasmus Andersson