@@ -18,6 +18,7 @@ module.exports.register = function () {
18
18
const args = {
19
19
repo : process . env . PREVIEW_REPO ,
20
20
branch : process . env . PREVIEW_BRANCH || 'HEAD' ,
21
+ watermark_branch : process . env . PREVIEW_WATERMARK_BRANCH ,
21
22
config : process . env . PREVIEW_CONFIG || process . env . PREVIEW_BRANCH || 'HEAD' ,
22
23
remote : process . env . PREVIEW_REMOTE ? true : false ,
23
24
repoPath : ( ( process . env . REPO_PATH || '..' )
@@ -135,8 +136,9 @@ module.exports.register = function () {
135
136
playbook . content . sources = mappedSources
136
137
137
138
const date = new Date ( ) . toISOString ( ) . split ( 'T' ) [ 0 ]
139
+ const watermark_branch = args . watermark || args . branch
138
140
playbook . asciidoc . attributes [ 'page-watermark' ] =
139
- `${ date } ${ args . repo } ${ args . branch } `
141
+ `${ date } ${ args . repo } ${ watermark_branch } `
140
142
141
143
// console.dir(playbook, {depth: 5}); process.exit(1)
142
144
// reinflate .env before updating
@@ -187,8 +189,6 @@ function getSources(playbook, additionalSources) {
187
189
return Object . fromEntries ( sources )
188
190
}
189
191
190
-
191
-
192
192
function overrideArray ( _options ) {
193
193
return ( _arr1 , arr2 ) => arr2
194
194
}
@@ -227,4 +227,4 @@ function spawn(...args) {
227
227
}
228
228
} )
229
229
} )
230
- }
230
+ }
0 commit comments