.git directory hooks directory is there in that post commit file i have to write script for to identify whether the developer pushes any .java file in to git repo.if atleast one java file is there the build should start.i already wrote script to do automate build in post commit hook(curl http my jenkins project path). suppose developers push only property files no need to build
Asked
Active
Viewed 195 times
1 Answers
0
The simplest solution is a script to detect the file extension of new files pushed:
See "Want Git post receive hook to detect certain file types".
You could try and reuse what GitHub is using to detect language in what they receive:
This is what GitLab is doing... in a post-receive hook!