Skip to content

Commit

Permalink
added new CSS template build shell script, added makefile target for …
Browse files Browse the repository at this point in the history
…CSS builds, added CI test linting of new shell script
  • Loading branch information
chrissimpkins committed Dec 12, 2017
1 parent 10f8656 commit 12b5801
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -11,9 +11,12 @@ build-with-dependencies: source/*.ufo
./build-woff2.sh --install-dependencies
./build-subsets.sh

css:
tools/scripts/css/css-build.sh

lint: shellcheck ufolint

shellcheck: build-ttf.sh build-woff.sh build-woff2.sh build-subsets.sh tools/scripts/install/ttfautohint-build.sh postbuild_processing/archive_prep/archiver.sh
shellcheck: build-ttf.sh build-woff.sh build-woff2.sh build-subsets.sh tools/scripts/install/ttfautohint-build.sh postbuild_processing/archive_prep/archiver.sh tools/scripts/css/css-build.sh
$@ $^

subsets: source/*.ufo
Expand Down
20 changes: 20 additions & 0 deletions tools/scripts/css/css-build.sh
@@ -0,0 +1,20 @@
#!/bin/sh

#######################################
# Copyright 2017 Christopher Simpkins
# MIT License
#######################################

# This script builds the Hack web font CSS files from CSS file templates
# by adding a git commit sha1 stamp to the URL string

# Dependency:
# Ink - https://github.com/chrissimpkins/ink (Go text templating application)
# - install with `go get github.com/chrissimpkins/ink`

# Usage:
# execute script from root of Hack repository with make using the following:
# $ make css


ink --replace="$(git log --pretty=format:'%h' --abbrev-commit -1)" build/web/hack.css.in build/web/hack-subset.css.in

1 comment on commit 12b5801

@26bandzz
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/reposting tysm

Please sign in to comment.