Compare commits

...

11 Commits

Author SHA1 Message Date
8ed31deb14 forgot map_id 2024-07-18 15:11:29 -07:00
ea4d48625d \#[serde(rename_all_fields)] can only be used on enums 2024-07-17 16:25:34 -07:00
41f9382b83 you stupid 2024-07-17 16:23:25 -07:00
5a26c80b2b syntax 2024-07-17 16:21:24 -07:00
dbec402e18 four spaces
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-16 13:24:05 -07:00
423ef695ef tab
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-16 13:22:50 -07:00
77270886fa g
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-16 13:21:54 -07:00
ead9b4f688 tab
Some checks failed
continuous-integration/drone/push Build is failing
2024-07-16 13:20:56 -07:00
5dfbc67886 we out here doing codegen
Some checks failed
continuous-integration/drone/push Build is failing
2024-07-16 13:20:23 -07:00
067aed97f4 try again
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-16 13:01:05 -07:00
871d9c3cd5 need serde rename fields or else everything is wrong
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-16 12:58:07 -07:00

View File

@ -9,5 +9,16 @@ do
--tonic_out=./rust-grpc/$name \
$f
#I couldn't figure out how to configure protoc to do this
sed -i "s/::prost::Message/::prost::Message, serde::Serialize, serde::Deserialize/g" "./rust-grpc/$name/$name.rs"
sed -i "s/#\[derive(Clone, PartialEq, ::prost::Message)\]/#\[derive(Clone, PartialEq, ::prost::Message, serde::Serialize, serde::Deserialize)\]\n#\[serde(rename_all = \"PascalCase\")\]/g" "./rust-grpc/$name/$name.rs"
sed -i "s/ pub id:/ #\[serde(rename = \"ID\")\]\n pub id:/g" "./rust-grpc/$name/$name.rs"
sed -i "s/ pub map_id:/ #\[serde(rename = \"MapID\")\]\n pub map_id:/g" "./rust-grpc/$name/$name.rs"
sed -i "s/ pub time_id:/ #\[serde(rename = \"TimeID\")\]\n pub time_id:/g" "./rust-grpc/$name/$name.rs"
sed -i "s/ pub file_id:/ #\[serde(rename = \"FileID\")\]\n pub file_id:/g" "./rust-grpc/$name/$name.rs"
sed -i "s/ pub game_id:/ #\[serde(rename = \"GameID\")\]\n pub game_id:/g" "./rust-grpc/$name/$name.rs"
sed -i "s/ pub user_id:/ #\[serde(rename = \"UserID\")\]\n pub user_id:/g" "./rust-grpc/$name/$name.rs"
sed -i "s/ pub mode_id:/ #\[serde(rename = \"ModeID\")\]\n pub mode_id:/g" "./rust-grpc/$name/$name.rs"
sed -i "s/ pub style_id:/ #\[serde(rename = \"StyleID\")\]\n pub style_id:/g" "./rust-grpc/$name/$name.rs"
sed -i "s/ pub state_id:/ #\[serde(rename = \"StateID\")\]\n pub state_id:/g" "./rust-grpc/$name/$name.rs"
sed -i "s/ pub place_id:/ #\[serde(rename = \"PlaceID\")\]\n pub place_id:/g" "./rust-grpc/$name/$name.rs"
sed -i "s/ pub vip_server_id:/ #\[serde(rename = \"VipServerID\")\]\n pub vip_server_id:/g" "./rust-grpc/$name/$name.rs"
done