From 88b5399c458adf9c87ec3642b84921ec524d3513 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Sat, 16 Nov 2024 09:46:06 +1300 Subject: [PATCH] Testing --- doc/mkdocs.bat | 11 +++++++++-- doc/mkdocs.ksc | 8 ++++++-- doc/mkdocs.rex | 13 ++++++++----- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/doc/mkdocs.bat b/doc/mkdocs.bat index 9df3e217..8bb93d10 100644 --- a/doc/mkdocs.bat +++ b/doc/mkdocs.bat @@ -153,15 +153,22 @@ k95.exe -Y -# 127 -C "save keymap %manual_dist_dir%default.ksc,exit" > NUL: REM Copy manual to the output directory updating version numbers, etc, as we go REM Parameters are: source-directory destination-directory, git-file-dates dry-run dev-mode web-mode use-https -k95.exe %docs_root%\mkdocs.ksc -Y -d -# 127 = %docs_root%\manual %OUT_DIR% %GIT_DATES% %DRY_RUN% %DEV_MODE% %WEB_MODE% %HTTPS_MODE% +k95.exe %docs_root%\mkdocs.ksc -Y -d -# 127 = %docs_root%\manual %OUT_DIR% %GIT_DATES% %DRY_RUN% %DEV_MODE% %WEB_MODE% %HTTPS_MODE% || goto :failed REM And update modified dates for anything that hasn't changed since the manual REM was added to git if "%DRY_RUN%" == "true" goto :skipfd -k95.exe -Y -H -# 127 -C ".manual_dir := %manual_dist_dir%,.modtime_file := %mtime_file%,rexx call setdates,exit" +k95.exe -Y -H -# 127 -C ".manual_dir := %manual_dist_dir%,.modtime_file := %mtime_file%,rexx call setdates,exit" || goto :failed :skipfd echo manual done. +goto :finished + +:failed +echo K95 Manual build failed with exit status: %errorlevel% +set errorlevel=1 + +:finished popd set REGINA_MACROS=%REGINA_MACROS_OLD% diff --git a/doc/mkdocs.ksc b/doc/mkdocs.ksc index b4f5855c..8076fc11 100644 --- a/doc/mkdocs.ksc +++ b/doc/mkdocs.ksc @@ -201,11 +201,14 @@ define date_to_touch_date { ; Function to update tags in a single file def process_file { + echo process file local file_in file_out gitdate git_date define \%9 - .file_in := \Freplace(\%1,/,\\) - .file_out := \Freplace(\%2,/,\\) + ;.file_in := \Freplace(\%1,/,\\) + ;.file_out := \Freplace(\%2,/,\\) + .file_in := \%1 + .file_out := \%2 .gitdate := \%3 ; ============================================================================ @@ -279,6 +282,7 @@ while <= \%x \fdim(&f) { echo copy /overwrite:always \m(src_file) \m(dst_file) } else { copy /overwrite:always \m(src_file) \m(dst_file) + if fail exit 1 } if = \m(touch_files) 1 { diff --git a/doc/mkdocs.rex b/doc/mkdocs.rex index 19ca725f..8257c440 100644 --- a/doc/mkdocs.rex +++ b/doc/mkdocs.rex @@ -59,6 +59,9 @@ output_file = CKermit("return \m(file_out)") git_date = CKermit("return \m(git_date)") dev_mode = CKermit("return \m(dev_mode)") +input_file = changestr("/",input_file,"\") +output_file = changestr("/",output_file,"\") + /* 1 = use https://kermitproject.org, 0 = use http://kermitproject.org */ use_https = CKermit("return \m(use_https)") @@ -81,11 +84,11 @@ if use_html = 0 then do output_file = changestr(".html",output_file,".htm") end -/* +/**/ say "input_file =" input_file say "output_file =" output_file say "git date =" git_date -*/ + /* REXX doesn't allow returning stems, get_version_tags will create the tags * stem as a global, and populate it with information about the Kermit version @@ -187,7 +190,7 @@ do while lines(input_file) = 1 /* For debugging say fields.0 'fields' do i = 1 to fields.0 - say i '»'fields.i'«' + say i '�'fields.i'�' end*/ @@ -214,7 +217,7 @@ do while lines(input_file) = 1 /* For debugging say fields.0 'fields' do i = 1 to fields.0 - say i '»'fields.i'«' + say i '�'fields.i'�' end */ @@ -272,7 +275,7 @@ get_version_tags: procedure expose tags. /* For debugging: output each of the things found in the herald say fields.0 'fields' do i = 1 to fields.0 - say i '»'fields.i'«' + say i '�'fields.i'�' end*/ tags.ver_num = fields.1 /* $ver$ */