Skip to content

Commit

Permalink
Updated .gitignore and automated setup procedure (oppia#3943)
Browse files Browse the repository at this point in the history
* Added local property condition for M1 Mac

* Added comment

* Improved some Contributor Experience

* NIT

* Fixed command only for darwin

* NIT

* seperated the script, removed misc and run configurations

* added EOF

* Update scripts/buf_m1_mac_setup.sh

Co-authored-by: Akshay Nandwana <[email protected]>

* Updated .gitignore to only track particular files

Co-authored-by: Akshay Nandwana <[email protected]>
  • Loading branch information
FareesHussain and anandwana001 committed Nov 10, 2021
1 parent 65f04b7 commit 7465b0b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 31 deletions.
14 changes: 4 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
*.iml
.gradle
/local.properties
/.idea/assetWizardSettings.xml
/.idea/caches
/.idea/compiler.xml
/.idea/gradle.xml
/.idea/jarRepositories.xml
/.idea/libraries
/.idea/modules.xml
/.idea/navEditor.xml
/.idea/vcs.xml
/.idea/workspace.xml
.idea/*
!.idea/encodings.xml
!.idea/codeStyles/Project.xml
!.idea/codeStyleConfig.xml
app/build
data/build
domain/build
Expand Down
9 changes: 0 additions & 9 deletions .idea/misc.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

10 changes: 10 additions & 0 deletions scripts/buf_m1_mac_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Setup protobuf platform for M1 Mac
arch_name="$(uname -m)"
if [ "${arch_name}" = "x86_64" ] && [[ "$OSTYPE" == "darwin"* ]]; then
if [ "$(sysctl -in sysctl.proc_translated)" = "1" ]; then
echo 'protobuf_platform=osx-x86_64' >> ../oppia-android/local.properties
echo 'Added protobuf platform to local properties.'
fi
fi
3 changes: 3 additions & 0 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ bash ../oppia-android/scripts/checkstyle_download.sh

# Download buf
bash ../oppia-android/scripts/buf_download.sh

# Add protobuf platform for M1 Mac
bash ../oppia-android/scripts/buf_m1_mac_setup.sh

0 comments on commit 7465b0b

Please sign in to comment.