newversion.cmd
newversion.cmd
replaces the re-motion assemblies in a given project for those from a new version. This tool assumes that the (PhoneBook) project's
assemblies are stored in the Remotion\net-3.5\bin\Debug
subdirectory. The tool uses the unzipper 7z.exe
to unpack a given Remotion_X.zip
file from the Development
directory on the development server.
Unfortunately, 7z.exe
can't extract specific files from an archive. We must extract everything into a temporary ("scratch") directory and cherry-pick the files from the scratch\net-3.5\bin\Debug
subdirectory. These files are copied to the specified project. Before copying, the specified target Remotion\net-3.5\bin\Debug
sub-directory is deleted recursively.
usage
In the tools directory (or wherever), incant
newversion C:\PhoneBook-SVN 1.13.13.0
This replaces all files in C:\PhoneBook-SVN\Remotion\net-3.5\bin\Debug
for the net-3.5\bin\Debug
files in the Remotion_1.13.13.0.zip
files.
you are not done yet
newversion.cmd
ONLY replaces the assemblies. It does not upgrade the referneces in the projects (PhoneBook.Domain, PhoneBook.Sample, PhoneBook.Web). For instruction what to do next, see Upgrading to a new re-motion version
Room for improvement
A stupid weakness is the tool's shotgun-approach to deleting files. The recursive "delete all" semantics covers the .svn
directories, too. This doesn't do any harm, because these directories are write-protected. However, trying to delete the .svn
directories IS scary. A more selective approach would be better.
Where to get 7z
http://www.7-zip.org/download.html – it is free (open source)
newversion.cmd assumes there is a path to 7z