Add raw Kotlin client source gate
ober
299b6c7ba36d7603d6674a49a32ed99f8a9d21a8
new file mode 100755 --- /dev/null +++ b/scripts/check-no-raw-kotlin.sh @@ -0,0 +1,19 @@ +#!/bin/sh +set -eu + +repo=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd -P) +cd "$repo" + +clients="templates/ssd-review.ss templates/original-tactics.ss" +for directory in templates/ssd-review-parts templates/original-tactics-parts; do + if [ -d "$directory" ]; then + clients="$clients $(find "$directory" -type f -name '*.ss' -print)" + fi +done + +if rg -n '\((kotlin-file|kotlin-file-lines|kotlin-source-dir)([[:space:]]|$)' $clients; then + printf '%s\n' 'raw Kotlin client source remains' >&2 + exit 1 +fi + +printf '%s\n' 'both Android clients contain only typed Jerboa Kotlin sources'