feat(gitea): wiki 支援 SKILLSET 技能組異動報告頁型 #26
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
# check-wiki-rules — 驗證 wiki repo 解析與 hash-id 規則。
|
# check-wiki-rules — 驗證 wiki repo 解析與 hash-id 規則。
|
||||||
# 涵蓋全部十一種頁面類型,每種三項:專用變數優先、退回共用變數、不得跨類型代用。
|
# 涵蓋 TYPES 列的每一種頁面類型,每種三項:專用變數優先、退回共用變數、不得跨類型代用。
|
||||||
# 全部通過印 OK 並 exit 0;任一項不符印出差異並 exit 1。
|
# 全部通過印 OK 並 exit 0;任一項不符印出差異並 exit 1。
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|||||||
gitea="$dir/gitea.sh"
|
gitea="$dir/gitea.sh"
|
||||||
hash_id="$dir/hash-id"
|
hash_id="$dir/hash-id"
|
||||||
|
|
||||||
TYPES='QUESTION PLAN ANALYZE DELIVER MAINTAIN REPO LOG LEARN ERROR CHECK REPORT'
|
TYPES='QUESTION PLAN ANALYZE DELIVER MAINTAIN REPO LOG LEARN ERROR CHECK REPORT SKILLSET'
|
||||||
|
|
||||||
fail() {
|
fail() {
|
||||||
printf '%s\n' "$1" >&2
|
printf '%s\n' "$1" >&2
|
||||||
@@ -51,7 +51,7 @@ check_hash() {
|
|||||||
expect_eq "$got" "$want" "hash-id $input"
|
expect_eq "$got" "$want" "hash-id $input"
|
||||||
}
|
}
|
||||||
|
|
||||||
# 其他八個類型的誘餌值。跨類型代用一旦發生,回傳的就會是 decoy/{別的類型}。
|
# 其餘每一個類型的誘餌值。跨類型代用一旦發生,回傳的就會是 decoy/{別的類型}。
|
||||||
decoys() { # $1=要排除的類型
|
decoys() { # $1=要排除的類型
|
||||||
for t in $TYPES; do
|
for t in $TYPES; do
|
||||||
[ "$t" = "$1" ] || printf 'JSC_WIKI_REPO_%s=decoy/%s ' "$t" "$t"
|
[ "$t" = "$1" ] || printf 'JSC_WIKI_REPO_%s=decoy/%s ' "$t" "$t"
|
||||||
|
|||||||
Reference in New Issue
Block a user