Skip to content

Commit

Permalink
Adding documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
goergisn committed Jun 13, 2024
1 parent c62c607 commit 9fd987f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Scripts/generate_public_interface_definition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rm -rf comparison_version

function cleanup() {
rm -rf .build
# rm -rf $COMPARISON_VERSION_DIR_NAME
rm -rf $COMPARISON_VERSION_DIR_NAME
mv Adyen.xcode_proj Adyen.xcodeproj
}

Expand All @@ -36,34 +36,32 @@ function setupComparisonRepo() {
git clone -b $BRANCH $REPO

cd adyen-ios
mv Adyen.xcodeproj Adyen.xcode_proj
mv Adyen.xcodeproj Adyen.xcode_proj # We have to obscure the project file so `xcodebuild` uses the Package.swift to build the module
}

trap cleanup EXIT

# TODO: Compile a list of changed modules from the git diff
# TODO: Generate a Package.swift target that contains all modules
# TODO: Build each (updated + comparison) project once
# TODO: Only generate + compare an sdk dump from any module that had changes
# TODO: Generate a Package.swift library that contains all targets/modules so we don't have to do multiple slow `xcodebuild`

mv Adyen.xcodeproj Adyen.xcode_proj

echo "↘️ Checking out comparison version"

setupComparisonRepo # We're now in the comparison repository directory

echo "👷 Building & Diffing"
for MODULE in ${MODULE_NAMES[@]}
do

echo "👷 [$MODULE] Building comparison project"
echo "🛠️ [$MODULE] Building comparison project"
xcodebuild -derivedDataPath $DERIVED_DATA_PATH -sdk $SDK -scheme $MODULE -destination "platform=iOS,name=Any iOS Device" -target $TARGET -quiet

echo "📋 [$MODULE] Generating comparison api_dump"
xcrun swift-api-digester -dump-sdk -module $MODULE -o ../../api_dump_comparison.json -I $SDK_DUMP_INPUT_PATH -sdk $SDK -target $TARGET

cd ../..

echo "👷 [$MODULE] Building updated project"
echo "🛠️ [$MODULE] Building updated project"
xcodebuild -derivedDataPath $DERIVED_DATA_PATH -sdk $SDK -scheme $MODULE -destination "platform=iOS,name=Any iOS Device" -target $TARGET -quiet

echo "📋 [$MODULE] Generating new api_dump"
Expand Down

0 comments on commit 9fd987f

Please sign in to comment.