mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-11 10:46:43 +02:00
feat(docker): replace all-in-one image with FrankenPHP and Caddy based image + discard other images
- use serversideup/php as a base image - remove nginx unit base - remove app / webserver images - add bundle stage to remove pipeline dependency - update docker setup docs - edit gitlabci rules and release logic
This commit is contained in:
parent
49a43d08cc
commit
e5fb676cb6
58 changed files with 5830 additions and 5318 deletions
|
|
@ -191,26 +191,23 @@ function formatXML(contents: string) {
|
|||
return contents;
|
||||
}
|
||||
|
||||
let editorContents = "";
|
||||
try {
|
||||
editorContents = xmlFormat(contents, {
|
||||
return xmlFormat(contents, {
|
||||
indentation: " ",
|
||||
});
|
||||
} catch {
|
||||
// xml doesn't have a root node
|
||||
editorContents = xmlFormat("<root>" + contents + "</root>", {
|
||||
const editorContents = xmlFormat("<root>" + contents + "</root>", {
|
||||
indentation: " ",
|
||||
});
|
||||
// remove root, unnecessary lines and indents
|
||||
editorContents = editorContents
|
||||
return editorContents
|
||||
.replace(/^<root>/, "")
|
||||
.replace(/<\/root>$/, "")
|
||||
.replace(/^\s*[\r\n]/gm, "")
|
||||
.replace(/[\r\n] {2}/gm, "\r\n")
|
||||
.trim();
|
||||
}
|
||||
|
||||
return editorContents;
|
||||
}
|
||||
|
||||
function minifyXML(contents: string) {
|
||||
|
|
@ -218,20 +215,15 @@ function minifyXML(contents: string) {
|
|||
return contents;
|
||||
}
|
||||
|
||||
let minifiedContent = "";
|
||||
try {
|
||||
minifiedContent = xmlFormat.minify(contents, {
|
||||
return xmlFormat.minify(contents, {
|
||||
collapseContent: true,
|
||||
});
|
||||
} catch {
|
||||
minifiedContent = xmlFormat.minify(`<root>${contents}</root>`, {
|
||||
const minifiedContent = xmlFormat.minify(`<root>${contents}</root>`, {
|
||||
collapseContent: true,
|
||||
});
|
||||
// remove root
|
||||
minifiedContent = minifiedContent
|
||||
.replace(/^<root>/, "")
|
||||
.replace(/<\/root>$/, "");
|
||||
return minifiedContent.replace(/^<root>/, "").replace(/<\/root>$/, "");
|
||||
}
|
||||
|
||||
return minifiedContent;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue