Daily Build and better RSync usage
Following my previous post about RSync, i came across pretty trivial use case that i wanted my daily build to be copied to external locations in a new folder.
I could achieve this in couple of ways (for example):
- have one main StagingArea folder that is being sync, and post execution to copy the directory to a new name (use server side action / client side psexec)
- new option i found today was to use the "--copy-dest=DIR" - this allowed me to copy my new artifacts to a new folder on target while having rsync check for previous file on different directory (instead of maintaining StagingArea directory , i can simply put my previous build number )
So example for option two command line is (new build is 22.214.171.124 and previous build is 126.96.36.199) :
rsync.exe -av --copy-dest="../188.8.131.52" "184.108.40.206/" "[replace_with_target_machine]::[replace_with_rsync_module]/220.127.116.11"
i used this "complex" command line because i wanted that the build number will not be compared (coz i don't have folder with that name yet), pay attention that --copy-dest is relative to target directory you used.
Also when the source contains trailing "/" it means copy the directory content (not including the folder name)
Daily Build and better RSync usage Reviewed by Ran Davidovitz on 6:45 AM Rating: