Patching an existing enova system with hotfixes involves two steps. First extract the zip files, then copy the extracted files into your code base and compile and deploy it as usual. These two steps can of course be done manually if you want, but we have automated the steps to save time and to prevent errors.
Extracting of hotfixes
For eNova 5.3.1 it has now been released over 20 hotfixes. Nothing wrong with that, I think it’s good to have short release cycles, at least for patches. There might exist dependencies between hotfixes, and they’re not accumulative, patch N must be applied before patch N+1, which must be applied before N+2, and so on. The zip files should be extracted in order to a temporary folder. The script merge.ps1 does this, extracts all files to a subfolder called enova.
The script is located here:
http://downloads.wipcore.se/WipcoreProducts/Enova/merge.ps1.txt
Download it, rename it (remove ”.txt”), and move it to the hotfix folder where all the zip files are located.
Start cmd, and run:
powershell -ExecutionPolicy Unrestricted -File merge.ps1
The files in the enova subfolder:
Applying hotfixes
You now have a folder with a bunch of binary files. How does it help to update Webfoundation or other code projects? If you know for sure where you have each and every file in your code base, it could of course be done manually, but sometimes the enova files are located at multiple locations, Webfoundation is an example of such code base, it has Wipcore.dll located at 9 different places. If this is the case in your code base, then it can be hard to locate all files which should be updated. The best approach is of course to have a canonical folder where all referenced enova assemblies are located, and you should aim for this practice if possible.
Anyway, if you don’t know the state of your code base, and want to make it easy, there’s a tool which can update all distinct files in a target folder structure. It’s console based, which means you run it from cmd. The mandatory parameters for the tool are two, the source folder and the target folder. The tool is called copysync.exe and it is located here:
http://downloads.wipcore.se/PerJ/PerJahnUtils.zip
Here’s the usage information, displayed when running the program without any parameters:
CopySync 1.3 Usage: copysync [-n] [-s] [-v] -[t] <source folder> <target folder> <exclude files> Example: copysync C:\Projects\PlatformCode\*.dll C:\Projects\CustomerApp -*.resources.dll -n: Only copy files which are newer in source folder. -s: Perform a simulated copy without any side effects. -t: Generate TFS checkout script -v: Verbose logging
A good practice is to first perform a simulated updating the project code from the hotfix folder, enter:
copysync -v -s -t C:\myhotfixfolder\enova C:\myvendorsolutionfolder
The result:
Parsing path: 'C:\myhotfixfolder\enova' Total source files: 19 Parsing path: 'C:\myvendorsolutionfolder' Total destination files: 6464 Source: Unique file names: 19 Destination: Unique file names: 2286 Copying 96 files: ...
If the output looks ok, remove the ”-s” option, and rerun the command.
With the ”-t” option it will also be generated a batch script, called checkout.cmd, which can be executed to check out all updated files from a TFS repository, if you have your vendor specific code in TFS.
Postat i:Uncategorized
