Consolidated environmental information.
- Asp.net web application (source stored in svn)
- SQL Server Database (Database schema (tables / sprocs) stored in svn)
- the db version is synchronized with the build version of the web application. (stored in the table "CurrentVersion")
- CI hudson server that checks the web application from the repo and runs its own msbuild file for publishing / packaging.
My msbuild script updates the web application build version (Major.Minor.Revision.Build) for each build. "Revision" is installed on the current verified version of svn and "Build" on the hudson build number (incremented by each automatic build).
That way, I can map the application to a specific version of the chest, and also get other build statistics from the hudson build number.
I would like to automate the collection of migration scripts (updated sprocs, etc.) to add to the zip package. I think by comparing the version of svn db that is not yet deployed to the deployed version, I can find which db files have changed in the trunk since the last deployment in this database / environment.
This can be easily achieved by manually invoking the svn diff -r REVNO:REVNO to rename the modified .sql files. These files can be manually added to the package. It would be great if it could be automated.
First, I would suggest that I have to write a custom task to check for a version of db that has not yet been deployed. After that, I am completely unsure. Does anyone have any suggestion on how this will be achieved using the msbuild task, both existing and custom?
Finally, I will have to auto-generate a script to add to a package that updates the database version table in order to synchronize with the application.
P dub
source share