-
Notifications
You must be signed in to change notification settings - Fork 0
/
capability-models.sh
executable file
·55 lines (44 loc) · 1.41 KB
/
capability-models.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh
# NOTE: for debugging, add `-x`
set -e
tool="${FIDLIT_TOOL:-podman}"
if [ "$tool" != "docker" ]; then
if [ "$tool" != "podman" ]; then
echo "The \"tool\" argument value \"${tool}\" is not recognized." 1>&2
exit 1
fi
fi
if [ x"${IN_CONTAINER}" = "x" ]; then
if ! command -v ${tool} >/dev/null 2>&1; then
echo "The CLI for ${tool} commands could not be found and must be installed." 1>&2
exit 1
fi
tag_name="${TAG_NAME:-localhost/fidlit/capability-models:latest}"
${tool} run \
--name "fidlit-capability-models" \
--rm \
--entrypoint "/bin/ash" \
--env IN_CONTAINER=1 \
--env CI=1 \
--volume "$(pwd)/src/fidlit.app/":/workspace/out/ \
"$tag_name" \
./capability-models.sh
else
out_path="${OUT_PATH:-/workspace/out/}"
target_path="${out_path}src/api/examples/industries/"
cp \
/workspace/dist/airline-industry-capabilities.json \
${target_path}airlines/capabilities.json
cp \
/workspace/dist/aerospace-and-defense-industry-capabilities.json \
${target_path}aerospace-and-defense/capabilities.json
cp \
/workspace/dist/automotive-industry-capabilities.json \
${target_path}automotive/capabilities.json
cp \
/workspace/dist/banking-industry-capabilities.json \
${target_path}banking/capabilities.json
cp \
/workspace/dist/broadcasting-industry-capabilities.json \
${target_path}broadcasting/capabilities.json
fi