So I want to replicate some changes I made to my design files from dev to production (a.k.a. I want to deploy something).
I\'m somehow confused since my research did no
You can specify the document IDs to replicate, without having to write a filter. Post the replication document (or command) like so:
{ "source": "my_db"
, "target": "http://target:5984/target_db"
, "doc_ids": [ "_design/my_ddoc" ]
}
I keep my design documents stored as .js files on disk. Then I use couchdb-update-views to update the design documents on a server
npm install -g couchdb-update-views
couchdb-update-views --config /path/to/config.json --docsDir /path/to/design/docs/directory/
You can use 'Filtered Replication' (See http://wiki.apache.org/couchdb/Replication#Filtered_Replication for details)
Basically, you'll supply a function that returns true for design documents like;
function(doc, req) {
return "_design/" === doc._id.substr(0, 8)
}
and then add "filter":"ddocname/filtername" to your _replicate request body.