Skip to content

Instantly share code, notes, and snippets.

@kimsk
Created May 8, 2015 00:56
Show Gist options
  • Save kimsk/267edeb6571dbb994481 to your computer and use it in GitHub Desktop.
Save kimsk/267edeb6571dbb994481 to your computer and use it in GitHub Desktop.
pre-commit hook for greatfriends/ThaiBahtText (copy this file to ./git/hooks)
#!/bin/sh
./Packages/xunit.runner.console.2.0.0/tools/xunit.console GFDN.ThaiBahtTextFacts/bin/Release/GreatFriends.ThaiBahtTextFacts.dll -parallel all -html Result.html -nologo -quiet
@kimsk
Copy link
Author

kimsk commented May 8, 2015

ผมเอาโค้ดใน test.bat มาใส่ในนี้ คราวนี้ทุกครั้งที่ commit เทสต์ก็จะถูกรัน ถ้ารันผ่านก็ commit ถ้าไม่ผ่านก็จะไม่ commit ครับ

@kimsk
Copy link
Author

kimsk commented May 8, 2015

ถ้าดูใน .git/hooks จะมีหลายไฟล์ครับ สำหรับ push ก็ใช้ไฟล์ pre-push ครับ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment