Ver código fonte

Run lint via parallel make.

Peter Oliver 7 anos atrás
pai
commit
5e0b8f319b
2 arquivos alterados com 16 adições e 7 exclusões
  1. 3 7
      .travis.yml
  2. 13 0
      Makefile

+ 3 - 7
.travis.yml

@@ -2,10 +2,8 @@ sudo: true
 language: python
 language: python
 
 
 env:
 env:
-  - VARIANT=source/Hack-Regular.ufo
-  - VARIANT=source/Hack-Bold.ufo
-  - VARIANT=source/Hack-Italic.ufo
-  - VARIANT=source/Hack-BoldItalic.ufo
+  - TARGET="lint"
+  - TARGET="build-with-dependencies"
 
 
 before_script: 
 before_script: 
   - pip install ufolint
   - pip install ufolint
@@ -14,9 +12,7 @@ before_script:
   - sudo apt-get install -y gcc g++ libfreetype6-dev libglib2.0-dev libcairo2-dev
   - sudo apt-get install -y gcc g++ libfreetype6-dev libglib2.0-dev libcairo2-dev
 
 
 script: 
 script: 
-  - "ufolint $VARIANT"
-  - shellcheck build.sh
-  - ./build.sh --install-dependencies
+  - make -j $TARGET
 
 
 notifications:
 notifications:
   email: false
   email: false

+ 13 - 0
Makefile

@@ -0,0 +1,13 @@
+build: source/*.ufo
+	./build.sh
+
+build-with-dependencies: source/*.ufo
+	./build.sh --install-dependencies
+
+lint: shellcheck ufolint
+
+shellcheck: build.sh
+	$@ $^
+
+ufolint: source/*.ufo
+	$@ $^