Skip to content

Commit

Permalink
Merge branch 'master' into enable_ocis_7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mmattel authored Feb 5, 2025
2 parents 3a02ca7 + 2a2517e commit 9454468
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
27 changes: 21 additions & 6 deletions ext-antora/comp-version.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
'use strict'

// Extension to print the component, version and number of files that will be processed

/**
* Print a table of Component - Version - Number of Files + total.
* Only the number of files in the modules directory are counted
* Version 1.1.0
*
* ┌─────────┬────────┬─────────┬───────┐
* │ (index) │ Name │ Version │ Files │
* ├─────────┼────────┼─────────┼───────┤
* │ 0 │ 'ROOT' │ '~' │ 14 │
* │ 3 │ │ │ 14 │
* └─────────┴────────┴─────────┴───────┘
*/

module.exports.register = function () {
this.once('contentAggregated', ({ contentAggregate }) => {
console.log('\nProcessing the following components, versions and number of files\n')
var total_files = 0
const component_table = []
contentAggregate.forEach((bucket) => {
component_table.push ({Name: bucket.name, Version: bucket.version || '~', Files: bucket.files.length})
total_files += parseInt(bucket.files.length)
var count = 0
bucket.files.forEach((file) => {
if (file.src.path.startsWith('modules')) {
count += 1
}
})
component_table.push ({Name: bucket.name, Version: bucket.version || '~', Files: count})
total_files += count
})
component_table.length++
component_table.length++
component_table.push ({Files: total_files})
console.table(component_table)
console.log() // do not delete, else we get a double empty line
Expand Down
4 changes: 3 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ content:
- master
- '4.4'
- '4.3'
- url: https://github.com/owncloud/docs-client-branding.git
branches:
- master

ui:
supplemental_files: overlay
Expand Down

0 comments on commit 9454468

Please sign in to comment.