File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
targets/nixos-wiki.nixos.org Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 9494
9595 # Read page content and add management comment
9696 content=$(cat "$wiki_file")
97- content_with_comment="<!--
98- This page is automatically managed through git repository synchronization.
97+
98+ # Define the comment content
99+ comment_text="This page is automatically managed through git repository synchronization.
99100 Do not edit this page directly on the wiki - changes will be overwritten.
100101 To edit this page, modify the file: $filename
101- Source: https://github.com/NixOS/nixos-wiki-infra/blob/main/pages/$filename
102+ Source: https://github.com/NixOS/nixos-wiki-infra/blob/main/pages/$filename"
103+
104+ # Use appropriate comment syntax based on page type
105+ if [[ "$filename" == *.css.wiki ]]; then
106+ content_with_comment="/*
107+ $comment_text
108+ */
109+
110+ $content"
111+ else
112+ content_with_comment="<!--
113+ $comment_text
102114 -->
103115
104116 $content"
117+ fi
105118
106119 # Edit the page using maintenance script (no --user means system maintenance user)
107120 echo "$content_with_comment" | ${ config . services . phpfpm . pools . mediawiki . phpPackage } /bin/php \
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ pre_deployment_checks() {
5555
5656 # Check SSH connectivity
5757 log " Checking SSH connectivity to ${WIKI_HOST} ..."
58- if ! ssh -o ConnectTimeout=10 -o BatchMode=yes " ${SSH_TARGET} " " echo 'SSH connection successful'" ; then
58+ if ! ssh -o ConnectTimeout=10 " ${SSH_TARGET} " " echo 'SSH connection successful'" ; then
5959 error " Cannot establish SSH connection to ${WIKI_HOST} "
6060 return 1
6161 fi
You can’t perform that action at this time.
0 commit comments