Skip to content

Commit bd2a5ee

Browse files
authored
Adjusted nested directory approach to adding a new array of non-grouped repos to repos.json (#8)
1 parent 78aa0d8 commit bd2a5ee

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
lines changed

.devcontainer/clone-repos.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jq -c '.groups[]' $MANIFEST | while read group; do
88

99
echo "$group" | jq -c '.repos[]' | while read -r repo; do
1010
NAME=$(echo $repo | jq -r .name)
11-
URL=$(echo $repo | jq -r .url)
11+
URL=$(echo $repo | jq -r .url)
1212
TARGET="/mnt/data/crucible/$GROUP/$NAME"
13-
13+
1414
if [ ! -d "$TARGET" ]; then
1515
echo "Cloning $NAME..."
1616
git clone "$URL" "$TARGET"
@@ -19,3 +19,18 @@ jq -c '.groups[]' $MANIFEST | while read group; do
1919
fi
2020
done
2121
done
22+
23+
jq -c '.repos[]' "$MANIFEST" | while read -r repo; do
24+
NAME=$(echo "$repo" | jq -r .name)
25+
URL=$(echo "$repo" | jq -r .url)
26+
TARGET="/mnt/data/crucible/$NAME"
27+
28+
mkdir -p "$(dirname "$TARGET")"
29+
30+
if [ ! -d "$TARGET" ]; then
31+
echo "Cloning $NAME..."
32+
git clone "$URL" "$TARGET"
33+
else
34+
echo "$NAME already exists, skipping."
35+
fi
36+
done

.devcontainer/repos.json

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,24 +124,16 @@
124124
"url": "https://github.com/cmu-sei/blueprint.ui"
125125
}
126126
]
127-
},
127+
}
128+
],
129+
"repos": [
128130
{
129131
"name": "crucible-docs",
130-
"repos": [
131-
{
132-
"name": "crucible-docs",
133-
"url": "https://github.com/cmu-sei/crucible"
134-
}
135-
]
132+
"url": "https://github.com/cmu-sei/crucible"
136133
},
137-
{
134+
{
138135
"name": "helm-charts",
139-
"repos": [
140-
{
141-
"name": "helm-charts",
142-
"url": "https://github.com/cmu-sei/helm-charts"
143-
}
144-
]
136+
"url": "https://github.com/cmu-sei/helm-charts"
145137
}
146138
]
147139
}

Crucible.AppHost/AppHost.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
.WithRealmImport($"{builder.AppHostDirectory}/resources/crucible-realm.json");
2121

2222
var mkdocs = builder.AddContainer("mkdocs", "squidfunk/mkdocs-material")
23-
.WithBindMount("/mnt/data/crucible/crucible-docs/crucible-docs", "/docs", isReadOnly: true)
23+
.WithBindMount("/mnt/data/crucible/crucible-docs", "/docs", isReadOnly: true)
2424
.WithHttpEndpoint(port: 8000, targetPort: 8000)
2525
.WithArgs("serve", "-a", "0.0.0.0:8000");
2626

0 commit comments

Comments
 (0)