From 4ef3e6c3ed2b68b51037bb2299a8ecadd1e74e2c Mon Sep 17 00:00:00 2001 From: Kyle Date: Sun, 18 May 2025 23:01:27 +0800 Subject: [PATCH] Update gen_ag_interface_template --- .gitignore | 3 ++- Scripts/gen_ag_interface_template.sh | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 91c0a0e7..c38447d0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ DerivedData/ .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata .netrc coverage.txt -TODO.md \ No newline at end of file +TODO.md +template.swiftinterface diff --git a/Scripts/gen_ag_interface_template.sh b/Scripts/gen_ag_interface_template.sh index 9932f192..fe5f919d 100755 --- a/Scripts/gen_ag_interface_template.sh +++ b/Scripts/gen_ag_interface_template.sh @@ -15,12 +15,10 @@ cd $OPENGRAPH_ROOT # Copy to template file cp .build/debug/OpenGraph.build/OpenGraph.swiftinterface ./template.swiftinterface -# Process the template file -# 1. Remove the first 5 lines -# 2. Remove all references of "OpenGraph_SPI." -# 3. Replace all references of "OpenGraph" to "AttributeGraph" -# 4. Replace all references of "OG" to "AG" sed -i '' '1,5d' ./template.swiftinterface +sed -i '' '1i\ +@_exported public import AttributeGraph +' ./template.swiftinterface sed -i '' 's/OpenGraph_SPI\.//g' ./template.swiftinterface sed -i '' 's/OpenGraph/AttributeGraph/g' ./template.swiftinterface sed -i '' 's/OG/AG/g' ./template.swiftinterface