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

Docs: init script (closes #132) #136

Merged
merged 1 commit into from
Dec 31, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
If you want to contribute to Hercule, please use a GitHub pull request.
This is the fastest way for features and fixes to be reviewed and merged it into the code base.

To do this, clone the repo and run:

```bash
./scripts/init
```

This will install the necessary dependencies and configure project git hooks.

## Getting started

The process of submitting a pull request is fairly straightforward and generally follows the same pattern each time:
Expand Down
26 changes: 26 additions & 0 deletions scripts/init
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# Script to initialize repo
# - install required node packages
# - install git hooks


node=`which node 2>&1`
if [ $? -ne 0 ]; then
echo "Please install NodeJS."
echo "http://nodejs.org/"
exit 1
fi

npm=`which npm 2>&1`
if [ $? -ne 0 ]; then
echo "Please install NPM."
fi


echo "Installing required npm packages..."
npm install

echo "Installing git hooks..."
ln -sf commit-msg .git/hooks/commit-msg
ln -sf pre-commit .git/hooks/pre-commit