-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4596 from vector-im/steve/add_setup_project_script
Tools: Add a script to initialize quickly and easily the project
- Loading branch information
Showing
3 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# Use this script to setup the Xcode project | ||
|
||
# Remove existing project file if any | ||
rm -r Riot.xcodeproj | ||
|
||
# Create the xcodeproj with all project source files | ||
xcodegen | ||
|
||
# Use appropriated dependencies | ||
|
||
# Check if Podfile changed in unstaged | ||
git diff --exit-code --quiet --name-only Podfile | ||
PODFILE_HAS_CHANGED_UNSTAGED=$? | ||
# Check if Podfile changed in staged | ||
git diff --staged --exit-code --quiet --name-only Podfile | ||
PODFILE_HAS_CHANGED_STAGED=$? | ||
|
||
# If Podfile has changed locally do not modify it | ||
# otherwise use the appropriated dependencies according to the current branch | ||
if [[ "$PODFILE_HAS_CHANGED_UNSTAGED" -eq 1 || "$PODFILE_HAS_CHANGED_STAGED" -eq 1 ]]; then | ||
echo "Podfile has been changed locally do not modify it" | ||
else | ||
echo "Podfile has not been changed locally, use appropriated dependencies according to the current branch" | ||
bundle exec fastlane point_dependencies_to_same_feature | ||
fi | ||
|
||
# Create the xcworkspace with all project dependencies | ||
pod install |