Skip to content

Commit

Permalink
Support latest node using additional_dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Dec 13, 2015
1 parent 4fbd50b commit 300bbd4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
8 changes: 4 additions & 4 deletions pre_commit_mirror_maker/make_repo.py
Expand Up @@ -99,11 +99,11 @@ def _apply_version_and_commit(
format_files_to_directory(src_dir, '.', format_vars)

# Commit and tag
subprocess.check_call(['git', 'add', '.'])
subprocess.check_call([
subprocess.check_call(('git', 'add', '.'))
subprocess.check_call((
'git', 'commit', '-m', 'Mirror: {0}'.format(version)
])
subprocess.check_call(['git', 'tag', 'v{0}'.format(version)])
))
subprocess.check_call(('git', 'tag', 'v{0}'.format(version)))


def make_repo(
Expand Down
9 changes: 9 additions & 0 deletions pre_commit_mirror_maker/node/hooks.yaml
@@ -0,0 +1,9 @@
- id: {entry}
name: {name}
entry: {entry}
language: {language}
files: {files}
args: {args}
# Use additional_dependencies to install the actual node package
additional_dependencies: ['{name}@{version}']
minimum_pre_commit_version: 0.7.0
7 changes: 2 additions & 5 deletions pre_commit_mirror_maker/node/package.json
@@ -1,8 +1,5 @@
{{
"name": "__dummy_package",
"name": "dummy_package",
"description": "Note: double curly-braces because python .format",
"version": "0.0.0",
"scripts": {{
"preinstall": "npm install {name}@{version} -g"
}}
"version": "0.0.0"
}}

0 comments on commit 300bbd4

Please sign in to comment.