Targeting correct build with `eas update`

I just wanted to clarify something about how to make sure I am targeting the correct build when running an eas update when my “enterpriseProvisioning” is set to “universal” for an app just used within an organization, not on the app stores.

Do I specify the channel or profile as part of the eas update command? In other words, if my initial build was triggered with this command: eas build --profile new --platform all , what would a subsequent eas update command look like if I want to target that same build config? Would it be:

eas update --profile new --platform all

Thanks! FYI, for reference, the config for this build in my eas.json is as follows:

    "new": {
      "channel": "next",
      "android": {
        "buildType": "apk"
      },
      ios: {
        "enterpriseProvisioning": "universal",
        resourceClass: "m1-medium"
      }
    }

When running update you need to specify branch, by default channel pulls updates from branch with the same name, but you can change it

There is no flag --profile in eas update command

Ah, okay, then this should work based on my eas.json listed above, and based on the initial build command I listed above, correct?

eas update --channel next --platform all

Sorry, I mislead you in your other thread. You need to publish to a branch, not a channel. I imagine that if you specify both it will update the channel to point to the given branch.

So you’ll need to specify the branch explicitly with --branch, or implicitly with --auto

NOTE: With --auto, it will push to an EAS branch with the same name as your Git branch. There is no requirement for the EAS branch name to match the Git branch name, so if you specify the name with --branch, you are free to choose a name that makes the most sense for your situation.

1 Like

Okay, after reading both your messages, I think I may have it clear now. Since branch is assigned to the same name as what I used for channel in the build by default, according to this config:

"new": {
  "channel": "next",
  "android": {
    "buildType": "apk"
  },
  ios: {
    "enterpriseProvisioning": "universal",
    resourceClass: "m1-medium"
  }
}

… then subsequently, when targeting this build, I can run this command:

eas update --branch next --platform all