Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(core): force sorting mimetypenames.dist.json
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
  • Loading branch information
skjnldsv committed May 14, 2025
commit d7c70d0367c8df0543ba8d66de0cf9eac108a28b
8 changes: 6 additions & 2 deletions resources/config/mimetypenames-update.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash

# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

set -e

# Paths
Expand Down Expand Up @@ -48,8 +52,8 @@ while read -r MIME; do
fi
done <<< "$MIME_TYPES"

# Final formatting
jq '.' "$OUTPUT_JSON.tmp" > "$OUTPUT_JSON" && rm "$OUTPUT_JSON.tmp"
# Final formatting and sorting by keys
jq -S . "$OUTPUT_JSON.tmp" > "$OUTPUT_JSON" && rm "$OUTPUT_JSON.tmp"

echo "✅ Done!"
echo "✔️ Descriptions found for $MATCHED_COUNT MIME types"
Expand Down
18 changes: 8 additions & 10 deletions resources/config/mimetypenames.dist.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"_comment" : "Array of human readable mimes.",
"_comment2": "Any changes you make here will be overwritten on an update of Nextcloud.",
"_comment3": "Put any custom mappings in a new file mimetypenames.json in the config/ folder of Nextcloud",

"_comment4": "After any change to mimetypenames.json run:",
"_comment5": "./occ maintenance:mimetype:update-js",
"_comment6": "Otherwise your update won't propagate through the system.",

"_comment": "Array of human readable mimes.",
"_comment2": "Any changes you make here will be overwritten on an update of Nextcloud.",
"_comment3": "Put any custom mappings in a new file mimetypenames.json in the config/ folder of Nextcloud",
"_comment4": "After any change to mimetypenames.json run:",
"_comment5": "./occ maintenance:mimetype:update-js",
"_comment6": "Otherwise your update won't propagate through the system.",
"application/epub+zip": "Electronic book document",
"application/gpx+xml": "GPX geographic data",
"application/gzip": "Gzip archive",
Expand All @@ -32,6 +30,7 @@
"application/vnd.ms-powerpoint.slideshow.macroEnabled.12": "PowerPoint presentation",
"application/vnd.ms-powerpoint.template.macroEnabled.12": "PowerPoint presentation template",
"application/vnd.ms-word.document.macroEnabled.12": "Word document",
"application/vnd.oasis.opendocument.formula": "ODF formula",
"application/vnd.oasis.opendocument.graphics": "ODG drawing",
"application/vnd.oasis.opendocument.graphics-flat-xml": "ODG drawing (Flat XML)",
"application/vnd.oasis.opendocument.graphics-template": "ODG template",
Expand Down Expand Up @@ -109,6 +108,5 @@
"video/webm": "WebM video",
"video/x-flv": "Flash video",
"video/x-matroska": "Matroska video",
"video/x-ms-wmv": "Windows Media video",
"application/vnd.oasis.opendocument.formula": "ODF formula"
"video/x-ms-wmv": "Windows Media video"
}
2 changes: 2 additions & 0 deletions resources/config/mimetypenames.dist.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
SPDX-License-Identifier: AGPL-3.0-only
Loading