Last active
July 1, 2019 22:30
-
-
Save cassidydotdk/2e50be44933ce164efd9d724c73094af to your computer and use it in GitHub Desktop.
Managing Unicorn targetDataStore in Gulp pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rename = require('gulp-rename'); | |
var replace = require('gulp-replace'); | |
... | |
gulp.task("B04-Sync-Unicorn", | |
function(callback) { | |
console.log("Executing Unicorn Sync"); | |
gulp.src([path.resolve(config.websiteRoot + '/App_Config/Include/zzz/Unicorn.TargetDataStore.config.EDITME')]) | |
.pipe(replace('#repository#', path.resolve('.'))) | |
.pipe(rename('Unicorn.TargetDataStore.config')) | |
.pipe(gulp.dest(config.websiteRoot + '/App_Config/Include/zzz/z')); | |
var options = {}; | |
options.siteHostName = config.hostName; | |
options.authenticationConfigFile = config.websiteRoot + "/App_config/Include/[blah blah]/z.Unicorn/Unicorn.zSharedSecret.config"; | |
unicorn(function() { return callback() }, options); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Keep this one in your solution under source control, and deploy it with Build Action Content | |
... | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<unicorn> | |
<defaults> | |
<targetDataStore> | |
<patch:attribute name="physicalRootPath">#repository#\unicorn\$(configurationName)</patch:attribute> | |
</targetDataStore> | |
<roleDataStore> | |
<patch:attribute name="physicalRootPath">#repository#\unicorn\Unicorn.Roles\$(configurationName)</patch:attribute> | |
</roleDataStore> | |
<userDataStore> | |
<patch:attribute name="physicalRootPath">#repository#\unicorn\Unicorn.Users\$(configurationName)</patch:attribute> | |
</userDataStore> | |
</defaults> | |
</unicorn> | |
</sitecore> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment