Comments
2 comments
-
Hello,
We've opened a ticket for this question as it's a little more complicated than forum communications allow. I'll update this forum thread with what we find out through the ticket. I'll be responding to you there shortly after submitting this message, thanks. -
I figured out the answers to my questions after the developers told me what I wanted couldn't be done.
The commands in the xml file (git.xml, mercurial.xml, etc.) need to run via cmd (not, say powershell). They are called with the repository as the active working directory.
$ScriptsFolder is the absolute path to the repository (C:myProject)
$Files is the list of files relative to $ScriptsFolder (Tablesdbo.table.sql, etc.)
$MessageFile is the absolute path to the commit message temp file
I don't know if anyone else will find a use for this knowledge, but it took me long enough to sort out, that I figured I should post it.
Add comment
Please sign in to leave a comment.
What I'd like to do is store the SQL definition scripts in separate directories, so I have a single copy of each database object, even though the core objects appear in two databases. My build process would merge these directories into a single build directory which is the one I link to Source Control.
Then when I change an item, Source Control would write the definition back to the build directory. What I'm trying to do is write a script that will run on Add that reads the schema from the file name, copies the file into the correct source directory, and adds it there instead of in the build directory.
As such, just passing ($Files) isn't good enough for me - I need to know what's actually contained in that variable. Is it the absolute path, the relative path (relative to what?), or just the file name without directory information (seems unlikely)?
Also, is there some way I can get debugging data out? I tried adding "> file.txt" to the command (remembering to escape it for XML), but no file was created.