You can use the SourceClear agent to scan a repository that uses a source code management (SCM) system other than Git.
Communicating SCM Metadata to the Agent
The SourceClear agent accepts SCM metadata from the caller through the following environment variables.
|Environment Variable||What It Controls|
|SRCCLR_SCM_URI||The URI you use to connect to the SCM system. For example:
https://svn.example.com/svn/repos or https://hg.example.com.
Note: This value is the default name of the project in SourceClear after you complete your first scan.
|SRCCLR_SCM_REF||Any meaningful name of the current working directory's state, such as a branch, a tag, or a similar concept in your SCM.|
|SRCCLR_SCM_REF_TYPE||Optional. The type of reference described in the SRCCLR_SCM_REF variable, which can be one of the following case-insensitive strings: branch, tag, or commit. The default value is commit.|
|SRCCLR_SCM_REV||The revision of the current working directory's state, which, for example, might be a Subversion change number or a Mercurial revision identifier.|
|SRCCLR_SCM_SUB_PATH||Optional. Only meaningful if the project is located in a subdirectory down from the root of the SCM repository (as one might find with a multi-project Mercurial repository). Users of Subversion and similar "directory addressable" source control systems will do better by specifying the full path to the project root as the SRCCLR_SCM_URI.|
$ svn checkout https://svn.code.sf.net/p/properties-mvn/svn/ properties-mvn $ cd properties-mvn
$ svn info Path: . Working Copy Root Path: /Users/mdaniel/.tmp/properties-mvn URL: https://svn.code.sf.net/p/properties-mvn/svn Relative URL: ^/ Repository Root: https://svn.code.sf.net/p/properties-mvn/svn Repository UUID: a38e15f5-c4e9-4b0a-8018-68579ae2876f Revision: 10 Node Kind: directory Schedule: normal Last Changed Author: ayanul Last Changed Rev: 10 Last Changed Date: 2010-09-29 04:28:27 -0700 (Wed, 29 Sep 2010)
$ export SRCCLR_SCM_URI=https://svn.code.sf.net/p/properties-mvn/svn $ export SRCCLR_SCM_REF=trunk $ export SRCCLR_SCM_REF_TYPE=branch $ export SRCCLR_SCM_REV=10 $ srcclr scan
The results print a summary to the terminal and provide a hyperlink to the full details on the SourceClear website.