Meteor setup

While buddybuild natively supports Cordova, additional steps are required to integrate Meteor into your build.

To start with, ensure you have checked in the .meteor folder in your project, excluding the local folder as buddybuild doesn’t need it. Without it, buddybuild won’t be able to build your project.

New project

First, we need to tell buddybuild how to build your meteor project. We can do this by having a buddybuild_postclone.sh file in the root of your repository. You can find more information about our custom build steps here.

buddybuild_postclone.sh
curl https://install.meteor.com/ | sh
meteor add-platform $PLATFORM
meteor build $PLATFORM --server $SERVER

Once you have that file in your repository, follow the steps to sign up with buddybuild. Your first build will fail, because buddybuild doesn’t yet know about the $PLATFORM and $SERVER environment variables we are using in the buddybuild_postclone.sh script.

The build failure screen

The $PLATFORM variable should be either ios or android, depending on which platform you want to build this project for. The $SERVER variable should represent your development server in the format server:port. Once you’ve added those 2 variables, retry the build.

Buddybuild detects many apps and frameworks within your project; make sure to select the correct one.

The app selection screen

For iOS projects, you should select the workspace project, the one not within a .meteor folder. For Android, you can select the Android project.

Errors and common build failures

When trying to build an app, you might find that the build fails with an error that looks like error: ios: platform is already added.

This is an indication that Meteor believes that your iOS project has already been added, however in all likelihood, you have your ios folder set to be ignored in Git.

The solution is to run meteor remove-platform ios, in one of two variations:

  1. You can run the command from your buddybuild_postclone.sh script.

  2. You can run the command locally, remove the ios folder from your .gitignore, and then commit the changes.

Either variation allows buddybuild to start with a consistent state for every build.

results matching ""

    No results matching ""