That’s a good question. I had a theory that it should be doable, but couldn’t really take the time to play with it. My theory was that something like…
require_once( dirname( __FILE__ ) . '/CountField.php' );
…might work. I know it would be a pain to pull the directory every time you want to push an update. Although it would be super easy just to create an svn:ignore for that directory and always have it on your local repo but not push with the rest.
We use codeship for deploying client projects. It is probably overkill to use it just for building themes and plugins, and for those we just use a regular repo on bitbucket. Codeship is more for validated deployment to live, operational sites or web apps to facilitate continuous deployment. Our full workflow in that case looks like this at a very high level:
- dev locally with a full wordpress site in a repo
- the repo master is on bitbucket and we have local forks
- we merge to the master repo through pull requests from our local forks (that are also on bitbucket)
- when a merge from pull request happens on bitbucket it uses a hook to trigger a build on codeship
- codeship validates all the php, runs any phpunit tests defined in the project, executes our custom commands like grunt to minify css, less, js, and runs the git commands to push the validated end result to the live server in real-time
If it hits any errors in that process it halts the build so that bugs are not introduced into the live site / app. It’s pretty awesome. There are other tools that will achieve basically the same thing, and we don’t have any experience with them, but codeship has been great.
It’s only git though. So it wouldn’t be possible to deploy to wp.org that way (which like I said would probably be overkill anyway). However, it would probably be possible to do something like that with another tool.
There’s a great comparison of all the major ones out there here:
https://en.wikipedia.org/wiki/Comparison_of_continuous_integration_software
which lists CSM compatibility for each if you’re interested in digging into it more.
All the best!
NS