Skip to content

Commit

Permalink
Merge pull request #54 from theleagueof/tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque authored Aug 17, 2020
2 parents 9e7f18a + ce5318b commit f9aa91c
Show file tree
Hide file tree
Showing 17 changed files with 328 additions and 92 deletions.
60 changes: 60 additions & 0 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
extends:
- '@commitlint/config-conventional'
rules:
subject-case: [2, 'always', 'sentence-case']
type-enum:
- 2
- always
- - build
- chore
- ci
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test
scope-empty: [1, 'never']
scope-enum:
- 1
- 'always'
- - actions
- azure
- build
- cirrus
- cli
- debug
- docker
- deps
- github
- manpage
- manual
- readme
- release
- shaper
- tooling
- travis
- ufo
- glyphs
- sfd
- otf
- ttf
- woff
help: |
**Possible types**:
`chore`: Improves existing functions or features
(Not for new features, bug fixes, or refactoring)
`ci`: Changes CI configuration files and scripts
(relevanat scopes: build, tooling, travis, azure, github)
`docs`: Adds or alters documentation.
`feat`: Adds a new user facing feature.
`fix`: Solves a user facing bug in previously released code
(Not for use if the bug isn't in master yet, clutters changelog)
`perf`: Improves performance.
`refactor`: Rewrites code without feature, performance, or bug changes.
`revert`: Changes that reverting other changes
`style`: Improves code formatting, white-space.
`test`: Adds or modifies tests.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[makefile*]
[{*.mk,Makefile*}]
indent_style = tab
indent_size = 4
26 changes: 18 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -22,15 +24,23 @@ jobs:
run: |
./bootstrap.sh
./configure
echo ::set-env name=VERSION::$(./build-aux/git-version-gen .tarball-version)
echo "::set-env name=MAKEFLAGS::-j$(nproc) -Otarget"
- name: Build
run: |
make
make distdir
- name: Get Build Info
run: |
echo ::set-env name=VERSION::$(./build-aux/git-version-gen .tarball-version)
- name: Upload Artifact
make dist
- name: Upload Artifacts
if: ${{ !contains(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v2-preview
with:
name: fontship-${{ env.VERSION }}
path: fontship*-${{ env.VERSION }}/
path: fontship*-${{ env.VERSION }}.zip
- name: Publish Release
if: contains(github.ref, 'refs/tags/v')
uses: softprops/[email protected]
with:
files: |
fontship-${{ env.VERSION }}.zip
fontship-${{ env.VERSION }}.tar.xz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 7 additions & 6 deletions .github/workflows/publish.yml → .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
name: Publish Docker image
name: Deploy

on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
deploy:

runs-on: ubuntu-20.04

steps:
- name: Check out the repo
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch Tags
run: git fetch --prune --tags
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
uses: docker/build-push-action@v1.1.0
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/release.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/superlinter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Superlinter

on: [push, pull_request]

jobs:
superlinter:
name: Lint
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Super-Linter
uses: github/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
### Generated files ###

fontship
fontship-*
.version
.version-prev

### Editor cruft ###

tags

# Development environment cruft

node_modules
package-lock.json

### Autotools ###
# http://www.gnu.org/software/automake

Expand Down
3 changes: 3 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MD001: false
MD013: false
MD014: false
71 changes: 71 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.2.1](https://github.com/theleagueof/fontship/compare/v0.2.0...v0.2.1) (2020-08-14)

* Fix automation so builds posted to Github Releases are automatic again.

## [0.2.0](https://github.com/theleagueof/fontship/compare/v0.1.1...v0.2.0) (2020-08-14)

* Setup separate build paths for different canonical sources (Glyphs, UFO, Fontforge, etc.). This is a lot more flexible than assuming fonts being build from any source need the same fixup treatment along the way. Also it gives a place to hook into and use Fontship's overall machinery while using a completely custom set of rules to do the actual font generation if for some reason the default commands aren't right.
* Add basic rules to generate from single instance UFO sources.
* Expand the CLI options a little bit with some output control. For example try `fontship -q make` for a much less noisy build cycle.
* Make sure local system installations check for the tools that will be needed at runtime (not used for Docker, etc. but useful for system installations).
* Add basic repository detection to `fontship status`.
* Leverage more `gftools fix-*` routines to cleanup generated fonts.

### [0.1.1](https://github.com/theleagueof/fontship/compare/v0.1.0...v0.1.1) (2020-08-14)

* Cleanup files generated during build process and tidy them away into a build dir.
* Allow local projects to and their own project local rules file.
* Package any found documentation or license files in distribution archives.
* Flesh out CI usage documentation.
* Suppress some unnecessary verbosity during build process.
* Make all system tools configurable.
* Update to latest Python font tooling available upstream.
* Fix parallel build issues.
* Allow building fonts in groups by either format (ttf, otf, etc.) or type (static, variable).

## [0.1.0](https://github.com/theleagueof/fontship/compare/v0.0.5...v0.1.0) (2020-08-14)

* Make it usable as a Github Action
* Cleanup layout of distribution archives

### [0.0.5](https://github.com/theleagueof/fontship/compare/v0.0.4...v0.0.5) (2020-08-14)

* Rename *Font Name**Family Name* to match use in font ecosystem tooling.
* Document how to set the Family Name for Docker builds (temporary, but works).
* Fix issues with Docker dependencies.

### [0.0.4](https://github.com/theleagueof/fontship/compare/v0.0.3...v0.0.4) (2020-08-14)

* Add dependencies such as fonttools, fontmake, gftools, ttfautohint, some Python stuff, etc.
* Add stubs for more CLI commands.
* Refactor CLI for more future versatility.
* Allow use of Glyphs as canonical source
* Add rules to build TTF, OTF, WOFF, WOFF2, and variable TTF artifacts.

### [0.0.3](https://github.com/theleagueof/fontship/compare/v0.0.2...v0.0.3) (2020-08-14)

* Document Arch Linux install.
* Work around Docker Hub kernel issues.

### [0.0.2](https://github.com/theleagueof/fontship/compare/v0.0.1...v0.0.2) (2020-08-14)

* Split makefiles for things we package vs. what we are.
* Add status functions.
* Add some basic font format conversion rules.
* Setup CLI as dispatcher.
* Document dependencies.
* Add CI tooling to generate releases.

### [0.0.1](https://github.com/theleagueof/fontship/compare/v0.0.0...v0.0.1) (2020-08-14)

* Setup Docker image.
* Expand documentation (as project spec).
* Allow usage of Python scripts from any location.

### [0.0.0](https://github.com/theleagueof/fontship/compare/v0.0.0...v0.0.1) (2020-08-14)

* Start project boilerplate.
24 changes: 22 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ datadir = $(datarootdir)/fontship

bin_SCRIPTS = fontship
python_PYTHON = fontship.py
dist_doc_DATA = README.md
dist_doc_DATA = README.md CHANGELOG.md
dist_man_MANS = fontship.1
dist_license_DATA = LICENSE
dist_data_DATA = src/rules.mk src/functions.mk src/rules-glyphs.mk src/rules-sfd.mk src/rules-ufo.mk
EXTRA_DIST = .version
EXTRA_DIST = .version Dockerfile

BUILT_SOURCES = .version

Expand All @@ -21,6 +21,26 @@ CLEANFILES = $(BUILT_SOURCES) $(bin_SCRIPTS)
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version

RELTYPE ?=

.PHONY: tagrelease
tagrelease:
test -z $$(git tag --points-at HEAD) || exit 0 # end if we are already on a release tag
git diff-index --quiet --cached HEAD || exit 1 # die if anything staged but not committed
git diff-files --quiet || exit 1 # die if any tracked files have unstagged changes
npm run release -- $(and $(RELTYPE),--release-as $(RELTYPE))

.PHONY: prerelease
prerelease: all

.PHONY: release-preview
release-preview:
npm run release -- --dry-run $(and $(RELTYPE),--release-as $(RELTYPE))

.PHONY: release
release: tagrelease


.PHONY: docker
docker: Dockerfile
docker build \
Expand Down
Loading

0 comments on commit f9aa91c

Please sign in to comment.