not sure about command line, but you can start a sync by calling the class.
using jumps.umbraco.usync;
.
uSync u = new uSync();
u.ReadAllFromDisk();
the latest version (1.5.8) also has ability to watch for file changes. set watchFolder to true in the usyncsettings.config and it will run the sync when ever files inside the usync folder are changed by something other than usync.
yep and sorry just noticed that is performing an import - an export is
u.SaveAllToDisk()
however everytime you compile your VS project the app pool will restart, and the sync will run anyway. if you want it to always do a full write out on application start you can set write=true in the settings file - but unless you are chaning db values without going via umbraco UI this doesn't add much.
I'm basically trying to get a workable development workflow (with source control) together for a team development environment. We are about to start a project with umbraco 7, and I'm really struggling to find a solution that I'm happy with.
uSync seems like the best option right now - but the 2 things I'm struggling with is
Every time somebody updates a view / template via visual studio, we would have to trigger uSync to export somehow
If somebody gets latest from source control, how to ensure that whatever is in the usync is sync'd to their umbraco instance
Maybe the watchFolder option might help with number 2, and we can work around number 1. Which element does the watchFolder attribute get set on, I cant see any documentation regarding it.
All that really matters is that views/templates are first created in umbraco because they are given an id, but the content of the files (after create) lives on the disk so a developer editing one of these files in vs and checking it in should have no problems.
Usync was written to be checked into source control keeping the usync foldt as part of your source control should be enough to keep things in sync.
You can turn each type of sync on or off in the concept g so if for example if you dont want usync to do anything with stylesheets you can turn it off.
Basic check in rule - always make sure your local site runs before checking in - then you dont get errors and usync will have ran at startup.?
Yeah as it evolved some of the documentation laged behind - the config file is the best place to look at the moment.
Trigger export from command line or api call
Is there any way I can trigger an export from either a command line call, powershell script or even api call (c#)?
I'm basically trying to ensure an export happens every time I compile my project in visual studio.
Matt
HI
not sure about command line, but you can start a sync by calling the class.
.
the latest version (1.5.8) also has ability to watch for file changes. set
watchFolder
to true in the usyncsettings.config and it will run the sync when ever files inside the usync folder are changed by something other than usync.yep and sorry just noticed that is performing an import - an export is
u.SaveAllToDisk()
however everytime you compile your VS project the app pool will restart, and the sync will run anyway. if you want it to always do a full write out on application start you can set write=true in the settings file - but unless you are chaning db values without going via umbraco UI this doesn't add much.
Thanks for the input
I'm basically trying to get a workable development workflow (with source control) together for a team development environment. We are about to start a project with umbraco 7, and I'm really struggling to find a solution that I'm happy with.
uSync seems like the best option right now - but the 2 things I'm struggling with is
All that really matters is that views/templates are first created in umbraco because they are given an id, but the content of the files (after create) lives on the disk so a developer editing one of these files in vs and checking it in should have no problems.
Usync was written to be checked into source control keeping the usync foldt as part of your source control should be enough to keep things in sync.
You can turn each type of sync on or off in the concept g so if for example if you dont want usync to do anything with stylesheets you can turn it off.
Basic check in rule - always make sure your local site runs before checking in - then you dont get errors and usync will have ran at startup.?
Yeah as it evolved some of the documentation laged behind - the config file is the best place to look at the moment.
Great thanks - understand whats going on now and its doing just what we need!
is working on a reply...