Skip to content

Commit a95396c

Browse files
committed
trigger
1 parent faa0073 commit a95396c

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
set -euo pipefail
3838
3939
# 1. Parse waarden uit config.js
40-
DOMAIN=$(grep -Po 'pubDomain:\s*"\K[^"]+' content/js/config.js | tr -d '[:space:]' || true)
40+
DOMAIN=$(grep -Po 'pubDomain:\s*"\K[^"]+' content/js/config.js | tr -d '[:space:]' || true)
4141
SPEC_STATUS=$(grep -Po 'specStatus:\s*"\K[^"]+' content/js/config.js | tr -d '[:space:]' || true)
4242
SPEC_TYPE=$(grep -Po 'specType:\s*"\K[^"]+' content/js/config.js | tr -d '[:space:]' || true)
4343
SHORT_NAME=$(grep -Po 'shortName:\s*"\K[^"]+' content/js/config.js | tr -d '[:space:]' || true)
@@ -55,7 +55,21 @@ jobs:
5555
exit 1
5656
fi
5757
58-
echo "🔍 Gevonden: pubDomain=$DOMAIN, specStatus=$SPEC_STATUS, specType=$SPEC_TYPE, shortName=$SHORT_NAME, publishDate=$PUBLISH_DATE"
58+
# 1b. Valideer specStatus tegen toegestane waarden
59+
ALLOWED_STATUS=(wv cv vv def ld basis)
60+
if [[ ! " ${ALLOWED_STATUS[*]} " =~ " $SPEC_STATUS " ]]; then
61+
echo "::error title=Invalid specStatus::$SPEC_STATUS is geen geldige specStatus. Mogelijke waarden: ${ALLOWED_STATUS[*]}"
62+
exit 1
63+
fi
64+
65+
# 1c. Valideer specType tegen toegestane waarden
66+
ALLOWED_TYPES=(no st im pr hr wa al bd bp)
67+
if [[ ! " ${ALLOWED_TYPES[*]} " =~ " $SPEC_TYPE " ]]; then
68+
echo "::error title=Invalid specType::$SPEC_TYPE is geen geldige specType. Mogelijke waarden: ${ALLOWED_TYPES[*]}"
69+
exit 1
70+
fi
71+
72+
echo "Gevonden en gevalideerd: pubDomain=$DOMAIN, specStatus=$SPEC_STATUS, specType=$SPEC_TYPE, shortName=$SHORT_NAME, publishDate=$PUBLISH_DATE"
5973
6074
# 2. Download pubDomainList.json indien nog niet aanwezig
6175
CONFIG_JSON=pubDomainList.json
@@ -90,8 +104,8 @@ jobs:
90104
echo "shortName=$SHORT_NAME" >> $GITHUB_OUTPUT
91105
echo "publishDate=$PUBLISH_DATE" >> $GITHUB_OUTPUT
92106
93-
echo "Metadata en folder-path gevalideerd en opgeslagen"
94-
107+
echo "Metadata en folder-path gevalideerd en opgeslagen"
108+
95109
- name: Checkout private docs
96110
uses: actions/checkout@v4
97111
with:

0 commit comments

Comments
 (0)