diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bf3d00d5..50ebccc1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,11 +5,11 @@ We are happy to accept any contributions that make sense and respect the rules l ## How to contribute 1. Fork the repo. -2. Create a feature branch for your contribution out of the `develop` branch. We use the [git-flow][gitflow-tool] tool to implement the [successful Git branching model][gitflow-post]. Only one contribution per branch is accepted. +2. Create a feature branch for your contribution out of the `master` branch. Only one contribution per branch is accepted. 3. Implement your contribution while respecting our rules (see below). -4. Run `npm test` to make sure you didn't break anything. -5. Add tests for your contribution so that no one else will break it. -6. Submit a pull request against our `develop` branch! +4. If possible, add tests for your contribution to make sure it actually works. +5. Don't forget to run `npm test` just right before submitting, it also checks for code styling issues. +6. Submit a pull request against our `master` branch! ## Rules @@ -25,6 +25,4 @@ We are happy to accept any contributions that make sense and respect the rules l By contributing your code, you agree to license your contribution under our [LICENSE](LICENSE). -[gitflow-post]: -[gitflow-tool]: [editorconfig]: diff --git a/git_hooks/pre-commit/version b/git_hooks/pre-commit/version deleted file mode 100755 index aaaeee78..00000000 --- a/git_hooks/pre-commit/version +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -if ! git rev-parse --verify HEAD >/dev/null 2>&1; then - exit 0 -fi - -if ! which -s jq 1>/dev/null; then - echo "ERROR: required tool 'jq' is missing, try 'brew install jq'" - exit 4 -fi - -CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` -HOTFIX_PREFIX=`git config gitflow.prefix.hotfix` -RELEASE_PREFIX=`git config gitflow.prefix.release` -PACKAGE="package.json" - -if [ ! -f $PACKAGE ]; then - echo "ERROR: package.json is missing" - exit 1 -fi - -PACKAGE_VERSION=`jq -r .version $PACKAGE` - -function __bail { - echo "ERROR: package.json claims version $PACKAGE_VERSION but branch is $CURRENT_BRANCH" - exit 2 -} - -case $CURRENT_BRANCH in - $HOTFIX_PREFIX*) - if [[ $CURRENT_BRANCH != ${HOTFIX_PREFIX}${PACKAGE_VERSION} ]]; then - __bail - fi - ;; - $RELEASE_PREFIX*) - if [[ $CURRENT_BRANCH != ${RELEASE_PREFIX}${PACKAGE_VERSION} ]]; then - __bail - fi - ;; -esac - -exit 0