diff --git a/README.md b/README.md index ae6421b..f34568c 100644 --- a/README.md +++ b/README.md @@ -9,16 +9,22 @@ Supported repositories: ##How to use it +###Prerequisites +1. CodeTopology is using svn.exe to generate svn log. It is a part of TortoiseSVN so you have to install TortoiseSVN with selected "command line client tools" option. This is required only for SVN repositories. + +2. Script file dowloaded from the internet may be blocked. Before running script remember to unblock GenerateReport.ps1 file. In order to unblock script go to file options, find "Security" section on "General" tab and select "Unblock" option. + +###Generate report To generate CodeTopology report run the following script from powershell console +- For Git repository ```powershell .\GenerateReport.ps1 -Verbose -VCS Git -CheckoutDir path_to_your_repository_checkout_dir ``` - -###Prerequisites -1. CodeTopology is using svn.exe to generate svn log. It is a part of TortoiseSVN so you have to install TortoiseSVN with selected "command line client tools" option. - -2. Script file dowloaded from the internet may be locked. Before running script remember to unlock file in file's options. +- For SVN repository +```powershell +.\GenerateReport.ps1 -Verbose -VCS SVN -CheckoutDir path_to_your_repository_checkout_dir +``` ##TeamCity integration diff --git a/src/GenerateReport.ps1 b/src/GenerateReport.ps1 index 183ac09..9c64c05 100644 --- a/src/GenerateReport.ps1 +++ b/src/GenerateReport.ps1 @@ -136,6 +136,7 @@ function Get-GitLog{ param($OutFilePath) Write-Verbose "Start collecting Git log" + Add-Type -AssemblyName System.Web $currentLocation = Get-Location Set-Location $CheckoutDir $logentrySeparator = [guid]::NewGuid() @@ -195,4 +196,4 @@ switch($VCS) } Bundle-Report -ClocDataFile "$tmpDir\cloc.csv" -SvnLogFile "$tmpDir\svnlogfile.xml" -OutDataFile "$tmpDir\result.json" -Remove-Item $tmpDir -Recurse -Force \ No newline at end of file +Remove-Item $tmpDir -Recurse -Force