Skip to content

Commit 689ba62

Browse files
authored
Merge pull request #168 from LiliaFramework/codex/find-information-scraped-by-workflow
Scrape module uniqueID
2 parents 8ee67de + 95a41a4 commit 689ba62

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ jobs:
135135
[ -f "$m" ] || continue
136136
dir=${m%%/*}
137137
name_key=$(grep -Po 'MODULE\.name\s*=\s*"[^"]*"' "$m" | sed -E 's/.*=\s*"([^"]+)".*/\1/' || true)
138+
uniqueid=$(grep -Po 'MODULE\.uniqueID\s*=\s*"[^"]*"' "$m" | sed -E 's/.*=\s*"([^"]+)".*/\1/' || true)
138139
author=$(grep -Po 'MODULE\.author\s*=\s*"[^"]*"' "$m" | sed -E 's/.*=\s*"([^"]+)".*/\1/' || true)
139140
discord=$(grep -Po 'MODULE\.discord\s*=\s*"[^"]*"' "$m" | sed -E 's/.*=\s*"([^"]+)".*/\1/' || true)
140141
desc_key=$(grep -Po 'MODULE\.desc\s*=\s*"[^"]*"' "$m" | sed -E 's/.*=\s*"([^"]+)".*/\1/' || true)
@@ -152,6 +153,7 @@ jobs:
152153
feat=$(parse_list "$rawf")
153154
work=$(parse_list "$raww")
154155
jq --arg name "$name" \
156+
--arg uniqueID "$uniqueid" \
155157
--arg author "$author" \
156158
--arg discord "$discord" \
157159
--arg desc "$desc" \
@@ -161,7 +163,7 @@ jobs:
161163
--arg public_uniqueID "$dir" \
162164
--argjson features "$feat" \
163165
--argjson workshop "$work" \
164-
'. += [{name:$name,author:$author,discord:$discord,description:$desc,version:$version,download:$download,source:$source,public_uniqueID:$public_uniqueID,features:$features,workshop:$workshop}]' modules_data.json > tmp.json
166+
'. += [{name:$name,uniqueID:$uniqueID,author:$author,discord:$discord,description:$desc,version:$version,download:$download,source:$source,public_uniqueID:$public_uniqueID,features:$features,workshop:$workshop}]' modules_data.json > tmp.json
165167
mv tmp.json modules_data.json
166168
done
167169
- name: zip-modules

0 commit comments

Comments
 (0)