Skip to content

Add local build script build.sh#1743

Open
fire-at-will wants to merge 2 commits into
mainfrom
local-build-script
Open

Add local build script build.sh#1743
fire-at-will wants to merge 2 commits into
mainfrom
local-build-script

Conversation

@fire-at-will
Copy link
Copy Markdown
Contributor

Adds a script to scripts/build.sh to allow developers to easily build the React Native SDK locally.

Usage:

  • ./scripts/build.sh: Builds the full SDK stack. Pulls pods, JS dependencies, and builds the SDK and purchase tester apps for web, iOS, and Android.
  • ./scripts/build.sh ios: Pulls pods, then builds the SDK + purchase tester for iOS
  • ./scripts/build.sh android: Pulls gradle dependencies, then builds the SDK + purchase tester for Android
  • ./scripts/build.sh web: Runs yarn prepare-expo

@fire-at-will fire-at-will requested a review from a team as a code owner April 29, 2026 22:33
@fire-at-will fire-at-will added the pr:other A code change that improves performance label Apr 29, 2026
@fire-at-will fire-at-will changed the title All local build script build.sh Add local build script build.sh Apr 29, 2026
Comment thread scripts/build.sh
yarn example pods
}

build_web_sdk() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess this doesn't only build the web sdk, but it does build our SDKs for all platforms (and prepares it to be used by our purchase tester expo app)... Additionally, it's quite confusing with the build_js_sdk method above as well IMO

Comment thread scripts/build.sh
# ./build.sh Build the full SDK stack: JS/web, iOS, and Android.
# ./build.sh ios Install JS dependencies and pods, then build JS and the iOS example workspace.
# ./build.sh android Install JS dependencies, then build JS and Android.
# ./build.sh web Install JS dependencies, then build the web/Expo package.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can be done in a separate PR but could be nice to add commands to actually run the sample apps as well... Though in this case, maybe it shouldn't be in build.sh but a different script 😅

Comment thread scripts/build.sh
;;
esac

echo "Done building the RevenueCat React Native SDK."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a thought... But should we do all this in fastlane instead of a shell script? It might be easier to share some things if we do it there... On the other hand, it's true that it requires to setup ruby + all those dependencies, but considering this is mostly meant for developers which should already be using fastlane, I think that might be ok?

One thing that I think we would need to do for this to work though (and we probably should have setup a long time ago...). We would need to setup .ruby-gemset files in all SDKs so purr can automatically checkout the correct gemset (and install missing gems if needed).

Wdyt @RevenueCat/coresdk? I'm not too opposed to go to shell script if needed... But just feels like ruby/javascript are nicer to work with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:other A code change that improves performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants