Skip to content

Commit

Permalink
adding Git LFS
Browse files Browse the repository at this point in the history
  • Loading branch information
indirectlylit committed Oct 25, 2018
1 parent ccb5c1c commit 03b7841
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# use Git LFS to track large binary files
*.otf filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.ttc filter=lfs diff=lfs merge=lfs -text
*.woff filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ kolibri/**/build/*
kolibri/**/static/*
js-dist

# allow static assets to be checked in
# Allow static assets to be checked in. For large binary files, use Git LFS
!kolibri/**/static/assets/
!kolibri/**/static/assets/*
!kolibri/**/static/assets/**/*
Expand Down
7 changes: 7 additions & 0 deletions build_tools/i18n/fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io
import json
import logging
import mimetypes
import os
import re
import sys
Expand Down Expand Up @@ -88,6 +89,12 @@ def _woff_font_path(name, is_bold):


def _load_font(path):
guess = mimetypes.guess_type(path)
if guess[0] not in ["font/ttc", "font/ttf", "font/otf", "font/woff"]:
logging.error("Not a font file: {}".format(path))
logging.error("Guessed mimetype: '{}'".format(guess[0]))
logging.error("If this is a text file: do you have Git LFS installed?")
sys.exit(1)
return subset.load_font(path, FONT_TOOLS_OPTIONS, dontLoadGlyphNames=True)


Expand Down
5 changes: 3 additions & 2 deletions docs/start/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Most of the steps below require entering commands into your Terminal (Linux, Mac
Git & GitHub
~~~~~~~~~~~~

#. Install and set-up `Git <https://help.github.com/articles/set-up-git/>`__ on your computer. Try this `tutorial <http://learngitbranching.js.org/>`__ if you need more practice with Git!
#. Install and set up `Git <https://help.github.com/articles/set-up-git/>`__ on your computer. Try this `tutorial <http://learngitbranching.js.org/>`__ if you need more practice with Git!
#. `Sign up and configure your GitHub account <https://github.com/join>`__ if you don't have one already.
#. `Fork the main Kolibri repository <https://github.com/learningequality/kolibri>`__. This will make it easier to `submit pull requests <https://help.github.com/articles/using-pull-requests/>`__. Read more details `about forking <https://help.github.com/articles/fork-a-repo/>`__ from GitHub.

Expand All @@ -30,6 +30,7 @@ Install environment dependencies
#. Install `pip <https://pypi.python.org/pypi/pip>`__ package installer.
#. Install `Node.js <https://nodejs.org/en/>`__ (version 6 is required).
#. Install `Yarn <https://yarnpkg.com/>`__ according the `instructions specific for your OS <https://yarnpkg.com/en/docs/install/>`__.
#. Install and set up the `Git LFS extension <https://git-lfs.github.com/>`__. Remember to initialize with ``git lfs install`` after installing.

.. note::
Installing Node.js version 6.x:
Expand All @@ -39,7 +40,7 @@ Install environment dependencies

.. code-block:: bash
# Add apt sources from nodesource.com
# Add apt sources from nodesource.com
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
# Verify the latest version 6 of nodejs
apt-cache showpkg nodejs-legacy
Expand Down

0 comments on commit 03b7841

Please sign in to comment.