Skip to content

Commit

Permalink
Added pre-commit hooks and the Xamarin code sample validator.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Rønne Petersen committed Sep 21, 2011
1 parent f6aab8a commit f6597c2
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -56,3 +56,11 @@ two ways to build the various samples:
'Novell\Novell.MonoDroid.Common.targets'.

topdir is also used to find the MonoDroid Install directory.

Contributing
------------

Before adding a sample to the repository, please run either install-hook.bat
or install-hook.sh depending on whether you're on Windows or a Posix system.
This will install a Git hook that runs the Xamarin code sample validator before
a commit, to ensure that all samples are good to go.
Binary file added Xamarin.Edu.SampleGallery.Core.dll
Binary file not shown.
1 change: 1 addition & 0 deletions install-hook.bat
@@ -0,0 +1 @@
copy pre-commit.windows .git\hooks\pre-commit
3 changes: 3 additions & 0 deletions install-hook.sh
@@ -0,0 +1,3 @@
#!/bin/sh

cp pre-commit.posix .git/hooks/pre-commit
9 changes: 9 additions & 0 deletions pre-commit.posix
@@ -0,0 +1,9 @@
#!/bin/sh

for dir in `find . -type d -maxdepth 1`; do
mono --debug xcsv.exe $dir;

if [ $? != 0 ]; then
exit 1;
fi;
done;
9 changes: 9 additions & 0 deletions pre-commit.windows
@@ -0,0 +1,9 @@
#!/bin/sh

for dir in `find . -type d -maxdepth 1`; do
xcsv.exe $dir;

if [ $? != 0 ]; then
exit 1;
fi;
done;
Binary file added xcsv.exe
Binary file not shown.

0 comments on commit f6597c2

Please sign in to comment.