chore(common): Generate min-ver.md

This commit is contained in:
Darcy Wong 2024-05-08 13:13:18 +07:00
parent 134ecbe608
commit 326090b561
3 changed files with 97 additions and 43 deletions

49
resources/build/min-ver.sh Executable file
View file

@ -0,0 +1,49 @@
#!/usr/bin/env bash
set -e
set -u
set -x
#
# Usage: min-ver.sh
#
# Parses minimum-versions.inc.sh to update template file minimum-versions.md.in.
# If minimum-versions.md is changed, commit and push changes
#
## START STANDARD BUILD SCRIPT INCLUDE
# adjust relative paths as necessary
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
. "${THIS_SCRIPT%/*}/build-utils.sh"
## END STANDARD BUILD SCRIPT INCLUDE
. "${THIS_SCRIPT%/*}/minimum-versions.inc.sh"
function generate_table {
echo ""
echo "## minimum-versions.inc.sh Variables"
echo ""
echo "| KEYMAN Variable | Value |"
echo "|-----------------------------------|--------------|"
# Parameter expansion all the KEYMAN_MIN_* variable names into strarr array
readarray -d ' ' -t strarr <<< ${!KEYMAN_MIN*}
for((n=0; n<${#strarr[*]}; n++ )) do
echo "| ${strarr[n]} | ${!strarr[n]} |"
done
# Parameter expansion all the KEYMAN_MAX_* variable names into strarr array
readarray -d ' ' -t strarr <<< ${!KEYMAN_MAX*}
for((n=0; n<${#strarr[*]}; n++ )) do
echo "| ${strarr[n]} | ${!strarr[n]} |"
done
# Parameter expansion all the KEYMAN_DEFAULT_* variable names into strarr array
readarray -d ' ' -t strarr <<< ${!KEYMAN_DEFAULT*}
for((n=0; n<${#strarr[*]}; n++ )) do
echo "| ${strarr[n]} | ${!strarr[n]} |"
done
}
generate_table > minimum-versions.md

View file

@ -1,43 +0,0 @@
---
title: Keyman Minimum Versions
---
Changes in [minimum-versions.inc.sh](minimum-versions.inc.sh) should manually be propagated to the linked help files below:
## Keyman 18.0
Target Operating System and Platform Versions
### Keyman for Windows
Helpfile: [os.md](../../windows/src/desktop/help/common/os.md)
### Keyman for macOS
Helpfile: [requirements.md](../../mac/help/about/requirements.md)
### Keyman for Linux
Helpfile: [common/index.md](../../linux/help/common/index.md#q-what-linux-distros-will-keyman-work-with)
### Keyman iPhone and iPad
Helpfile: [system-requirements.md](../../ios/help/about/system-requirements.md)
### Keyman for Android
Helpfile: [system-requirements.md](../../android/help/about/system-requirements.md)
----
## Product Build Documentation
[linux-ubuntu.md](../../docs/build/linux-ubuntu.md)
[macos.md](../../docs/build/macos.md)
[windows.md](../../docs/build/windows.md)
## Keyman Engine Documentation
https://help.keyman.com/developer/engine/android/latest-version/

View file

@ -0,0 +1,48 @@
---
title: Keyman Minimum Versions
---
Changes in [minimum-versions.inc.sh](minimum-versions.inc.sh) should manually be propagated to the linked help files below:
## Keyman 18.0
Target Operating System and Platform Versions
### Keyman for Windows
Helpfile: [os.md](../../windows/src/desktop/help/common/os.md)
### Keyman for macOS
Helpfile: [requirements.md](../../mac/help/about/requirements.md)
### Keyman for Linux
Helpfile: [common/index.md](../../linux/help/common/index.md#q-what-linux-distros-will-keyman-work-with)
### Keyman iPhone and iPad
Helpfile: [system-requirements.md](../../ios/help/about/system-requirements.md)
### Keyman for Android
Helpfile: [system-requirements.md](../../android/help/about/system-requirements.md)
----
## Product Build Documentation
[linux-ubuntu.md](../../docs/build/linux-ubuntu.md)
[macos.md](../../docs/build/macos.md)
[windows.md](../../docs/build/windows.md)
## Keyman Engine Documentation
https://help.keyman.com/developer/engine/android/latest-version/
----
## minimum-versions.inc.sh variables