Detecting changed files (since last build) in CI builds


CircleCI’s Github integration will have it build on committed changes to repo on I was wondering if there is a mechanism (on checkout of the latest changes) to know what changed since last CircleCI build, particularly such that can get a list of files that changed since last build.

Or if not built-in to CircleCI, how might one do this? Would be nice feature to add to CircleCI.

Would like to have some conditional logic that performs additional actions based on the type of changes found. Something like git hooks, but not deployed locally/internally nor having to use GH’s webhooks, just keeping things inside CircleCI build process.


That information should be available in Git. What exact command(s) and flags depend on what specific info you’d want. This should be a useful starting point: How to detect commited file at test phase