Skip to content

Commit c08215c

Browse files
Add copy-specs.sh to sync OpenAPI specs to Python and Dart client repos
1 parent acd830c commit c08215c

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

copy-specs.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5+
EDITIONS=(ce pe paas)
6+
TARGETS=(
7+
"$SCRIPT_DIR/../thingsboard-python-client"
8+
"$SCRIPT_DIR/../thingsboard-dart-client"
9+
)
10+
11+
for target in "${TARGETS[@]}"; do
12+
for edition in "${EDITIONS[@]}"; do
13+
src="$SCRIPT_DIR/$edition/spec/openapi.json"
14+
dst="$target/$edition/spec/openapi.json"
15+
cp "$src" "$dst"
16+
echo "Copied $edition/spec/openapi.json -> $(basename "$target")/$edition/spec/openapi.json"
17+
done
18+
done

0 commit comments

Comments
 (0)