Skip to content

Commit b07f9e9

Browse files
authored
Merge pull request #5 from Automattic/add/pr-commenting
Add some more helpers
2 parents ddec117 + d8f3f92 commit b07f9e9

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

bin/build_and_test_pod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ if [ -f "Podfile.lock" ]; then
1111
install_cocoapods
1212
fi
1313

14+
if [ -f "Example/Podfile.lock" ]; then
15+
cd Example
16+
echo "--- :cocoapods: Setting up Pods"
17+
install_cocoapods
18+
cd -
19+
fi
20+
1421
echo "--- :test_tube: Building and Running Tests"
1522

1623
# For some reason this fixes a failure in `lib lint`

bin/comment_on_pr

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash -eu
2+
3+
PR_MESSAGE_FILE=$1
4+
5+
if ! command -v gh &> /dev/null; then
6+
brew install gh
7+
fi
8+
9+
gh auth login
10+
gh pr comment --body-file $PR_MESSAGE_FILE

bin/install_swiftpm_dependencies

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash -eu
2+
3+
sudo defaults write com.apple.dt.Xcode IDEPackageSupportUseBuiltinSCM YES
4+
5+
# Trust all GitHub.com and BitBucket.org keys – this allows checking out dependencies via SSH
6+
for ip in $(dig @8.8.8.8 bitbucket.org +short); do ssh-keyscan bitbucket.org,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true
7+
echo ":bitbucket: Added BitBucket IP Addresses to known_hosts"
8+
9+
for ip in $(dig @8.8.8.8 github.com +short); do ssh-keyscan github.com,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true
10+
echo ":github: Added GitHub IP Addresses to known_hosts"
11+
12+
xcodebuild -resolvePackageDependencies

0 commit comments

Comments
 (0)