Using the <vaultgetfile> task with NAnt
Moderator: SourceGear
Using the <vaultgetfile> task with NAnt
I have been successfully using the <vaultgetfile> NAnt task for a few days now and it's been working like a champ.
This morning, I added a new file to the solution. The file appears in Vault and is within the "root" of the folder specified in my task (see below).
The problem is that when the <vaultgetfile> task executes, it is not pulling down the new file. It looks as if the task only updates the previously retreived files with the latest version, but doesn't pull down new files or delete local copies of files removed from the server.
Is this expected functionality? If so, is there a way to tell the task to do a full sync. between the local folder and the server? Should I just be doing a delete on the local directory prior to executing the <vaultgettask> task? Or should I go back to the <exec> method and use the Vault command line interface?
Here's my NAnt target definition, if that helps.
<target name="update">
<vaultgetfile url="${vault.host}"
username="${vault.user}"
password="${vault.password}"
repository="${vault.repository}"
path="${vault.path}"
destination="${ccnet.working.directory}" />
</target>
This morning, I added a new file to the solution. The file appears in Vault and is within the "root" of the folder specified in my task (see below).
The problem is that when the <vaultgetfile> task executes, it is not pulling down the new file. It looks as if the task only updates the previously retreived files with the latest version, but doesn't pull down new files or delete local copies of files removed from the server.
Is this expected functionality? If so, is there a way to tell the task to do a full sync. between the local folder and the server? Should I just be doing a delete on the local directory prior to executing the <vaultgettask> task? Or should I go back to the <exec> method and use the Vault command line interface?
Here's my NAnt target definition, if that helps.
<target name="update">
<vaultgetfile url="${vault.host}"
username="${vault.user}"
password="${vault.password}"
repository="${vault.repository}"
path="${vault.path}"
destination="${ccnet.working.directory}" />
</target>
More information ...
Actually, if I delete the working directory contents before I call the <vaultgetfile> task, then nothing comes back from Vault and I get no errors. It's as if the task says "I successfully updated every file in your local directory (of which there are none) with the latest version from the server. Have a nice day."
Okay, I made up the "have a nice day" part, but the rest is what's apparantly happening.
What are my options, here?
Tony
Okay, I made up the "have a nice day" part, but the rest is what's apparantly happening.
What are my options, here?
Tony
-
- Posts: 60
- Joined: Wed Aug 18, 2004 11:15 am
-
- Posts: 60
- Joined: Wed Aug 18, 2004 11:15 am
I checked the Vault directory, but the files are not there.
It seems like Vault is just skipping the entire "get" process, but it's not throwing any errors.
I also tried upgrading to the latest Vault client and NAnt tasks, but that did not help.
Any ideas? Or should I just use the "exec" task to call the command line client?
Thanks,
Josh
It seems like Vault is just skipping the entire "get" process, but it's not throwing any errors.
I also tried upgrading to the latest Vault client and NAnt tasks, but that did not help.
Any ideas? Or should I just use the "exec" task to call the command line client?
Thanks,
Josh
-
- Posts: 60
- Joined: Wed Aug 18, 2004 11:15 am
My vaultgetfile call looks like this:
My variables are (I think) correct:
Code: Select all
<vaultgetfile url="${vault.server}" username="${vault.username}" password="${vault.password}" repository="${vault.repository}" path="${vault.path}\BasePages" destination="${build.folder}\BasePages" />
Code: Select all
[echo] Server: genesis
[echo] Username: admin
[echo] Password: <password>
[echo] Repository: SwiftProjects
[echo] Vault Path: $\JT\JT\BasePages
[echo] Local Path: Build\BasePages
Last edited by joshyeager on Mon Jun 19, 2006 7:56 am, edited 1 time in total.