Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #26 from Financial-Times/fix-squirrel-error
Browse files Browse the repository at this point in the history
Update squirrelify.js
  • Loading branch information
wheresrhys authored Jun 20, 2017
2 parents 171eb22 + fa634f7 commit 9f03ef0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
11 changes: 10 additions & 1 deletion index.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,17 @@ export PATH := ./node_modules/.bin:$(PATH)
# Use bash not sh
SHELL := /bin/bash

ifeq ("$(wildcard node_modules/@financial-times/n-gage/index.mk)","")
PATH_TO_NGAGE := ""
else
PATH_TO_NGAGE := "node_modules/@financial-times/n-gage/"
endif

# verify that secret-squirrel is set up to run on each commit
SQUIRRELIFY := $(shell node node_modules/@financial-times/n-gage/scripts/squirrelify.js)
SQUIRRELIFY := $(shell node ${PATH_TO_NGAGE}scripts/squirrelify.js)
ifneq ("$(SQUIRRELIFY)","squirrel ok")
$(error ${SQUIRRELIFY})
endif

# Some handy utilities
GLOB = git ls-files -z $1 | tr '\0' '\n' | xargs -I {} find {} ! -type l
Expand Down
1 change: 1 addition & 0 deletions scripts/squirrelify.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ try {
if (preCommit.indexOf('node_modules/.bin/secret-squirrel') === -1) {
squirrelError();
}
console.log('squirrel ok');
} catch (e) {
squirrelError();
}
10 changes: 10 additions & 0 deletions secret-squirrel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
files: {
allow: [],
allowOverrides: []
},
strings: {
deny: [],
denyOverrides: []
}
};

0 comments on commit 9f03ef0

Please sign in to comment.