-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgenerate.sh
More file actions
executable file
·40 lines (32 loc) · 934 Bytes
/
generate.sh
File metadata and controls
executable file
·40 lines (32 loc) · 934 Bytes
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
set -e
if [ -d "vrchat_dart_generated" ]; then
echo "Removing old files"
cd vrchat_dart_generated
# Remove old files
rm -rf doc lib test
cd ..
fi
cd vrchat_dart
dart pub get
# Run `./generate.sh local` to use a local copy of the spec
dart run tool/patch_input.dart "$@"
cd ..
# Ensure openapi-generator is installed and up to date
brew install openapi-generator
openapi-generator generate -g dart-dio -c generator-config.yaml
# We need to do a pub get in the output before patching it
cd vrchat_dart_generated
dart pub get
cd ..
# Format before patching since extra line breaks can break the patches
dart format .
cd vrchat_dart
dart run tool/patch_output.dart
cd ..
cd vrchat_dart_generated
# We probably won't ever use these, and telling the generator to not generate them is broken
echo "Removing tests"
rm -rf test
dart run build_runner build --delete-conflicting-outputs
dart fix --apply
dart format .