NAnt and Vault
Moderator: SourceGear
NAnt and Vault
I am trying to get NAnt to check out all of the files from my repository using a version of the NAnt tools here that have been modified to work with 3.0. Can someone give me a copy of their existing nant build script so I can understand what this looks like? Or at least tell me what the syntax of a request to get all of the files in a folder would look like.
Thanks
Thanks
The get command that I have in my test Nant setup is:
That being said, I had to modify some code in the Nant tasks to use it for 3.0. I plan to update the Nant tasks when I get everything set up for 3.0.
Code: Select all
<vaultgetfile
url="http://server/VaultService"
username="admin"
password="admin"
repository="Test repository"
filename="$/test"
destination="C:\temp\jeremy\nantbuild"
/>
-
- Posts: 60
- Joined: Wed Aug 18, 2004 11:15 am
They're up at http://vaultpub.sourcegear.com/build
-
- Posts: 47
- Joined: Tue Mar 23, 2004 3:54 pm
- Location: South Africa
- Contact:
I logged in to vaultpub.sourcegear.com and downloaded the last version before I made compatibillity changes for 3.0. The zip file is attached below.
- Attachments
-
- vaultnant2.zip
- Vault Nant Tasks for Vault 2.0
- (111.05 KiB) Downloaded 1046 times
-
- Posts: 47
- Joined: Tue Mar 23, 2004 3:54 pm
- Location: South Africa
- Contact:
I am using Vault version 2.0.6 and Nant 0.85.rc2. I am trying to compile the Vault Nant Tasks for Vault 2.0 (vaultnant2.zip) code and get the dll's, but there are errors when I compile this project. The code is from
http://support.sourcegear.com/viewtopic ... light=nant
Can you provide the Vault Nant binary for Vault version 2.0.6 and Nant 0.85.rc2 for us to download?
Thanks.
http://support.sourcegear.com/viewtopic ... light=nant
Can you provide the Vault Nant binary for Vault version 2.0.6 and Nant 0.85.rc2 for us to download?
Thanks.
What build errors are you encountering? It's not really feasible for me to update the 2.0 nant tasks for every release of Nant. If you tell me what build errors you're seeing I can help you make the compatibility changes. You can also use vault to login to vaultpub.sourcegear.com with the guest account. The Build Tool repository has the history of all of the source, so you should be able to diff the files that don't build to see what I did to fix them.
NAnt and Vault
After upzipping the vaultnant2.zip, there are 3 projects in the
vaultnant2.zip. They are nant.csproj, NAntVaultTasks for NAnt v0.8.2 and Vault 1.2.3/NAntVaultTasks.sln, and NAntVaultTasks for NAnt v0.8.3 and Vault 1.2.3/NAntVaultTasks.sln. There are errors when I compile each of these 3 projects. Could you tell me Which project is for the Vault 2.0.6 and Nant? so I can tell you the build errors.
vaultnant2.zip. They are nant.csproj, NAntVaultTasks for NAnt v0.8.2 and Vault 1.2.3/NAntVaultTasks.sln, and NAntVaultTasks for NAnt v0.8.3 and Vault 1.2.3/NAntVaultTasks.sln. There are errors when I compile each of these 3 projects. Could you tell me Which project is for the Vault 2.0.6 and Nant? so I can tell you the build errors.
NAnt and Vault
Thanks. I am trying to use NAnt <exec> to run vault.exe command line instead. However, I have problem passing strings with space in command line. for example, I want to add the file (file localpath) C:\Vault\My Files\help.chm in to Vault. There is a space in the "My Files" folder name.
<property name="vault_localpath" value="C:\Vault\My Files\help.chm" />
<target name="Vault_ADD" >
<exec
program="vault.exe"
basedir="C:\Program Files\SourceGear\Vault Client\"
commandline="ADD -server ${vault_server} -user ${vault_user} -password ${vault_password} -repository ${vault_repository} ${vault_repositorypath} ${vault_localpath}">
</exec>
</target>
Vault will read "C:\Vault\My" as the file localpath. It looks like Vault.exe splits the command line arg's by space. Are there any way to pass a string with space in Vault.exe?[/quote]
<property name="vault_localpath" value="C:\Vault\My Files\help.chm" />
<target name="Vault_ADD" >
<exec
program="vault.exe"
basedir="C:\Program Files\SourceGear\Vault Client\"
commandline="ADD -server ${vault_server} -user ${vault_user} -password ${vault_password} -repository ${vault_repository} ${vault_repositorypath} ${vault_localpath}">
</exec>
</target>
Vault will read "C:\Vault\My" as the file localpath. It looks like Vault.exe splits the command line arg's by space. Are there any way to pass a string with space in Vault.exe?[/quote]
Have you tried \"${vault_localpath}\"?
Another way that would definitely work is to use separate <arg> entries, specifiying the value attribute. See http://nant.sourceforge.net/release/lat ... /exec.html
Another way that would definitely work is to use separate <arg> entries, specifiying the value attribute. See http://nant.sourceforge.net/release/lat ... /exec.html