@@ -18,6 +18,7 @@ module.exports.register = function () {
1818 const args = {
1919 repo : process . env . PREVIEW_REPO ,
2020 branch : process . env . PREVIEW_BRANCH || 'HEAD' ,
21+ watermark_branch : process . env . PREVIEW_WATERMARK_BRANCH ,
2122 config : process . env . PREVIEW_CONFIG || process . env . PREVIEW_BRANCH || 'HEAD' ,
2223 remote : process . env . PREVIEW_REMOTE ? true : false ,
2324 repoPath : ( ( process . env . REPO_PATH || '..' )
@@ -135,8 +136,9 @@ module.exports.register = function () {
135136 playbook . content . sources = mappedSources
136137
137138 const date = new Date ( ) . toISOString ( ) . split ( 'T' ) [ 0 ]
139+ const watermark_branch = args . watermark || args . branch
138140 playbook . asciidoc . attributes [ 'page-watermark' ] =
139- `${ date } ${ args . repo } ${ args . branch } `
141+ `${ date } ${ args . repo } ${ watermark_branch } `
140142
141143 // console.dir(playbook, {depth: 5}); process.exit(1)
142144 // reinflate .env before updating
@@ -187,8 +189,6 @@ function getSources(playbook, additionalSources) {
187189 return Object . fromEntries ( sources )
188190}
189191
190-
191-
192192function overrideArray ( _options ) {
193193 return ( _arr1 , arr2 ) => arr2
194194}
@@ -227,4 +227,4 @@ function spawn(...args) {
227227 }
228228 } )
229229 } )
230- }
230+ }
0 commit comments