Search: Advanced search
Please enter a keyword or ID
Surround SCM NAnt Integration
Surround SCM supports integration with NAnt. See Surround SCM Third-Party Integrations for supported platform and versions.
Note: The following steps were tested using NAnt and NAnt-Contrib 0.92 RC 1 and Surround SCM 2012.1.
You must install the NAntContrib 0.85 or later package.
The following Surround SCM actions are supported: Get, Check Out, Check In, Freeze, Unfreeze, Branch, Label, and Batch. Refer to the NAnt Task Reference for task definitions and examples.
After the application project files are added to Surround SCM, you can add Surround SCM tasks to targets in the NAnt build file.
Note: You must provide the server connection information with Surround SCM tasks. If you received a server settings file for RSA key exchange from your Surround SCM administrator, you must specify the path to the XML file instead of the server address and port number
The attached file is an example build file for the Simple application, which was created using the Simple.cs file installed with NAnt in the nant
After the Surround SCM tasks are saved in the build file, enter the NAnt command at a command prompt to run the build.
Cannot recognize Surround SCM tasks
The contrib.nant package may not be installed correctly. Download the package and copy all the files to the NAntin directory.
Branch already exists
The snapshot branch name was not changed before the build. If using the Simple example, the snapshot branch name is hardcoded and must be changed before each build to create a snapshot branch with a unique name.
You may want to create a custom function to automatically generate a unique branch name based on the build timestamp. Keep in mind that the DateTime function returns a value that contains colons (:), which cannot be used in Surround SCM branch names. You may also want to store a version number in a separate file and create a function that reads the number, increments it for the branch name, and then updates the version number in the file for the next build.
Unable to check in files
The files are not checked out and Surround SCM does not allow check in without check out. A Surround SCM task to check out files is not used in the Simple example, so the example only works if connecting to a Surround SCM Server configured to allow check in of files without check out. Make sure the tasks added to your build file perform actions allowed in Surround SCM.
Files are read-only
The files were not made writable when retrieved from Surround SCM. Change the writable flag to true in the sscmget task to ensure retrieved files are writable.
A new build was not created after modifying the source file
A recursive get is also retrieving the application file in the bin repository and NAnt does not generate a new build because one already exists. Change the recursive flag to false in the sscmget task to ensure that only the files needed to compile the build are retrieved from Surround SCM.