Skip to content

Commit

Permalink
Try to fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
daneden committed Apr 30, 2022
1 parent bf59633 commit 11f1bcc
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ jobs:
run: |
cd Demo\ App
cp .env.example .env
./Scripts/prebuild.sh
xcodebuild -scheme Twift_SwiftUI -allowProvisioningUpdates
20 changes: 20 additions & 0 deletions Demo App/Scripts/prebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
if [ ! -f ".env" ];
then
echo "error: No .env file was found for environment variables. Check the README for setup instructions for this demo app.";
exit 1;
fi

set -o allexport; source .env; set +o allexport;

content="import Foundation
/// This file is automatically populated by a pre-action build script in the Twift_SwiftUI scheme
/// **Do not** check in the \`.env\` file or this generated \`Secrets.swift\` file to version control.
let TWITTER_API_KEY=\"$TWITTER_API_KEY\"
let TWITTER_API_SECRET=\"$TWITTER_API_SECRET\"
let TWITTER_CALLBACK_URL=\"$TWITTER_CALLBACK_URL\"
let CLIENT_ID=\"$CLIENT_ID\"
";

echo "$content" > Twift_SwiftUI/Secrets.swift;
exit 0;
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "cd $SRCROOT;&#10;&#10;./Scripts/prebuild.sh&#10;">
</ActionContent>
</ExecutionAction>
</PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
Expand Down

2 comments on commit 11f1bcc

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

View documentation coverage after this change
Filename Coverage
Total 87.62%
Twift+API.swift 100.00%
Twift+Authentication.swift 97.56%
Twift+Blocks.swift 100.00%
Twift+Bookmarks.swift 100.00%
Twift+Errors.swift 81.25%
Twift+Follows.swift 100.00%
Twift+Likes.swift 100.00%
Twift+Lists.swift 100.00%
Twift+Media.swift 92.59%
Twift+Mutes.swift 100.00%
Twift+Retweets.swift 100.00%
Twift+Search.swift 100.00%
Twift+Spaces.swift 90.00%
Twift+Streams.swift 100.00%
Twift+Tweets.swift 84.21%
Twift+Users.swift 100.00%
Twift.swift 100.00%
Types+List.swift 93.33%
Types+Media.swift 83.33%
Types+Place.swift 76.67%
Types+Poll.swift 86.67%
Types+Spaces.swift 65.71%
Types+Stream.swift 75.00%
Types+Tweet.swift 83.12%
Types+User.swift 88.37%
Types.swift 100.00%

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

View documentation coverage after this change
Filename Coverage
Total 87.62%
Twift+API.swift 100.00%
Twift+Authentication.swift 97.56%
Twift+Blocks.swift 100.00%
Twift+Bookmarks.swift 100.00%
Twift+Errors.swift 81.25%
Twift+Follows.swift 100.00%
Twift+Likes.swift 100.00%
Twift+Lists.swift 100.00%
Twift+Media.swift 92.59%
Twift+Mutes.swift 100.00%
Twift+Retweets.swift 100.00%
Twift+Search.swift 100.00%
Twift+Spaces.swift 90.00%
Twift+Streams.swift 100.00%
Twift+Tweets.swift 84.21%
Twift+Users.swift 100.00%
Twift.swift 100.00%
Types+List.swift 93.33%
Types+Media.swift 83.33%
Types+Place.swift 76.67%
Types+Poll.swift 86.67%
Types+Spaces.swift 65.71%
Types+Stream.swift 75.00%
Types+Tweet.swift 83.12%
Types+User.swift 88.37%
Types.swift 100.00%

Please sign in to comment.