Managing changes on a win server: patch to zip script
Published: jun 25, 2009
Tags: software, sose
page views: 1407
Situation: I work with a version control system for development. I roll-out your changes daily (or more frequently) to the production system. Changes are always plaintext script files. However the production system is a windows box and you cannot install any version control system on it. Windows doesn't come with the patch program.
Moving the whole directory over for each change is not an option.
So how to get the changes to the machine, and maintain some control?
Here's my solution:
- Get the version control system to publish the changeset as a diff and save that changeset at patches/my_change.patch
- run patch2zip that will create a zip in the same directory structure with all the changed files.
- Send the zip to the windows box.
- On the windows box, compare the directory with the zip, creating a back-up for each file before coping over the changed file with the new version from the zip.
Here download the patch2zip command. It should work with the zip command available in the path. Stand in the directory with the source files and point to the patch file. It will generate the zip file with the files next to the patch.