I am using one server to build the same project both continuously and nightly; however I would like the nightly build to only build if a modification exists during the day. I am hoping to achieve this with the constraint that both builds use the same working folder.
The two options I am considering are:
Polling the continuous build and only build the nightly build if a continuous build has occurred - possibly using some token system (continuous build sets token, nightly clears token).
Running a prebuild task to revert the source code to the Last Build Time
I am leaning towards the second option as it decouples the build scripts, but it seems to be a much harder task.
Suggestions and tips to doing this would be appreciated!
Added Information:
The CI build is a quick build of the solution in one configuration and maybe runs some fast unit tests.
The nightly build cleans the build environment, builds the software, packages into an installer, runs extended tests, labels the source code repository, deploys the installer to a server share for manual testers to pick up, and emails the test team that a testable build has been made.
I only want the nightly build to occur if there were any check-ins during the day so that testers don't get plagued with repeat emails for essentially the same build.