I had a need to get the CRC's of the files distributed in SharePoint solutions. BeyondCompare doesn't know how to look inside a .wsp file, but a .wsp file has the same structure as a .cab file, and BC can read the contents of a cab file.
(Note to ScooterSoftware - it would be helpful if you could inform BC that a .wsp file is a type of archive, identical to .cab files)
In our development environment, we deploy multiple solutions in a given release. I created a batch file that renames all the .wsp files extension to .cab, creates a snapshot of the directory, and then renames the files extension back from .cab to .wsp.
Following is the barebones example (no guarantee stated or implied!)
Predeployment Snapshot batch file
echo off
SETLOCAL ENABLEEXTENSIONS
REM set snapshot logfile
set snapshotlog=%CD%\Logs\snapshotlog.txt
REM set deployment directory to current directory
set deploydir=%CD%
REM set snapshot output file
set snapshotfile="%CD%\Logs\Snapshot.bcss"
REM rename all solution files to cab files
for /r %deploydir% %%x in (*.wsp) do ren "%%x" *.cab
REM call snapshot batch file
call snapshot.bat
REM rename all cab files to wsp files
for /r %deploydir% %%x in (*.cab) do ren "%%x" *.wsp
snapshot.bat:
setlocal
set path="C:\Program Files (x86)\Beyond Compare 4";%path%
Bcompare.exe /silent "@C:\Program Files (x86)\Beyond Compare 4\snapshotscript.txt" %snapshotlog% %deploydir% %snapshotfile%
endlocal
exit /b
REM end snapshot.bat
Snapshot Script (snapshotscript.txt):
#Log output
log verbose append:"%1"
#Capture directory contents to snapshot file
snapshot save-crc save-version no-filters expand-archives path:"%2" output:"%3"
(Note to ScooterSoftware - it would be helpful if you could inform BC that a .wsp file is a type of archive, identical to .cab files)
In our development environment, we deploy multiple solutions in a given release. I created a batch file that renames all the .wsp files extension to .cab, creates a snapshot of the directory, and then renames the files extension back from .cab to .wsp.
Following is the barebones example (no guarantee stated or implied!)
Predeployment Snapshot batch file
echo off
SETLOCAL ENABLEEXTENSIONS
REM set snapshot logfile
set snapshotlog=%CD%\Logs\snapshotlog.txt
REM set deployment directory to current directory
set deploydir=%CD%
REM set snapshot output file
set snapshotfile="%CD%\Logs\Snapshot.bcss"
REM rename all solution files to cab files
for /r %deploydir% %%x in (*.wsp) do ren "%%x" *.cab
REM call snapshot batch file
call snapshot.bat
REM rename all cab files to wsp files
for /r %deploydir% %%x in (*.cab) do ren "%%x" *.wsp
snapshot.bat:
setlocal
set path="C:\Program Files (x86)\Beyond Compare 4";%path%
Bcompare.exe /silent "@C:\Program Files (x86)\Beyond Compare 4\snapshotscript.txt" %snapshotlog% %deploydir% %snapshotfile%
endlocal
exit /b
REM end snapshot.bat
Snapshot Script (snapshotscript.txt):
#Log output
log verbose append:"%1"
#Capture directory contents to snapshot file
snapshot save-crc save-version no-filters expand-archives path:"%2" output:"%3"
Comment