Skip to content

Commit

Permalink
Add object files to default ignore patterns
Browse files Browse the repository at this point in the history
Avoid the step of having to ignore .o files when signing the app for
OSX. Also ignore Windows .obj files.
  • Loading branch information
malept committed Sep 16, 2016
1 parent 61dae6f commit 395c512
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ignore.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const DEFAULT_IGNORES = [
'/node_modules/electron-prebuilt($|/)',
'/node_modules/electron-packager($|/)',
'/\\.git($|/)',
'/node_modules/\\.bin($|/)'
'/node_modules/\\.bin($|/)',
'\\.o(bj)?$'
]

function generateIgnores (opts) {
Expand Down
Empty file added test/fixtures/basic/ignore.o
Empty file.
Empty file added test/fixtures/basic/ignore.obj
Empty file.
6 changes: 5 additions & 1 deletion test/ignore.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ function createIgnoreTest (opts, ignorePattern, ignoredFile) {

opts.name = 'basicTest'
opts.dir = util.fixtureSubdir('basic')
opts.ignore = ignorePattern
if (ignorePattern) {
opts.ignore = ignorePattern
}

var appPath

Expand Down Expand Up @@ -139,6 +141,8 @@ test('generateOutIgnores ignores all possible platform/arch permutations', (t) =
t.end()
})

util.testSinglePlatform('ignore default test: .o files', createIgnoreTest, null, 'ignore.o')
util.testSinglePlatform('ignore default test: .obj files', createIgnoreTest, null, 'ignore.obj')
util.testSinglePlatform('ignore test: string in array', createIgnoreTest, ['ignorethis'],
'ignorethis.txt')
util.testSinglePlatform('ignore test: string', createIgnoreTest, 'ignorethis', 'ignorethis.txt')
Expand Down

0 comments on commit 395c512

Please sign in to comment.