Skip to content

RobertKoikai/server

 
 

Repository files navigation

DEEP Server

Build Status Maintainability Test Coverage codecov

codecov

Git hooks for pre-commit

Add this to your .git/hooks/pre-commit to generate latest graphql schema before each commit.

#!/bin/sh

echo "pre-commit: Generating graphql schema."
if [ -z `docker ps -q --no-trunc | grep $(docker-compose ps -q web)` ]; then
    docker-compose run --rm web ./manage.py graphql_schema --out schema.graphql
else
    docker-compose exec -T web ./manage.py graphql_schema --out schema.graphql
fi

FYI: If hooks aren't working https://stackoverflow.com/questions/49912695/git-pre-and-post-commit-hooks-not-running

Packages

No packages published

Languages

  • Python 96.9%
  • XSLT 2.2%
  • HTML 0.8%
  • Shell 0.1%
  • CSS 0.0%
  • Dockerfile 0.0%