Skip to content

Commit

Permalink
Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrg committed Nov 15, 2024
1 parent 124bb96 commit 88b5399
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
11 changes: 9 additions & 2 deletions doc/mkdocs.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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%
Expand Down
8 changes: 6 additions & 2 deletions doc/mkdocs.ksc
Original file line number Diff line number Diff line change
Expand Up @@ -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

; ============================================================================
Expand Down Expand Up @@ -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 {
Expand Down
13 changes: 8 additions & 5 deletions doc/mkdocs.rex
Original file line number Diff line number Diff line change
Expand Up @@ -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)")

Expand All @@ -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
Expand Down Expand Up @@ -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*/


Expand All @@ -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
*/

Expand Down Expand Up @@ -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$ */
Expand Down

0 comments on commit 88b5399

Please sign in to comment.