Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS & Android Versions Numbers #24

Closed
bartonhammond opened this issue Dec 15, 2015 · 9 comments
Closed

iOS & Android Versions Numbers #24

bartonhammond opened this issue Dec 15, 2015 · 9 comments

Comments

@bartonhammond
Copy link
Owner

for iOS, the Fastlane "increment version" is running in Bitrise.io. But the updated project is not updated in GitHub so ..

Need to have process to grab the version number, eg 0.0.6, from the package.json and update both iOS and Android w/ that "release"

@bartonhammond bartonhammond changed the title iOS & Android Versions iOS & Android Versions Numbers Dec 15, 2015
@bartonhammond
Copy link
Owner Author

In general, you should manage the version number for yourself
and maybe have a “build number"
but don’t just auto-increment that
rather use the build number supplied by the related service
in case of bitrise.io you can use $BITRISE_BUILD_NUMBER env
or you can export it as an environment variable with envman

@bartonhammond
Copy link
Owner Author

@DanielMSchmidt
Copy link

Hi there,

I would really like to help, but first I would like to know why your fastfile uses so many sh commands. I don't really know why they are necessary and also what they do, so I am quite confused ;)

Our Fastfile looks something like this:

    sigh
    # use the UDID of the newly created provisioning profile
    ENV["PROFILE_UDID"] = lane_context[SharedValues::SIGH_UDID]

    increment_build_number
    gym
    commit_version_bump
    push_to_git_remote
    pilot

What it does is:

  1. Deals with Provisioning Profiles
  2. Increment the build version number (an app can only be submitted with one version number once)
  3. Commit and Push the version bump (with a message like "Deployed version XX")
  4. Push the builded version to the AppStore (or Testflight, dependant on the lane)

I stripped away every kind of configuration, but I would be glad to add a PR if you are uncertain, so that we can discuss this more on a code level.

Have a nice day!

@bartonhammond
Copy link
Owner Author

That's a good question! When I first was working w/ Fastlane it looked very similar to what you have except for the push_to_git_remote as I worried about the webhook kicking off another build and end up in a never ending recursion.

I've never worked w/ Apple before so all this Cert, App Id, Provisioning, etc is new to me.

When I was working w/ Fastlane on Bitrise, and it included the same steps almost exactly what you have, I went through a large number of builds and each build would generate a new Cert, App ID, and Prov Profile - I ended up w/ a bunch of them all defined here: https://developer.apple.com/account/ios/certificate/certificateList.action. I had no idea which ones were active or in use or even if I needed them all.

When I mentioned this to the Bitrise.io CTO, he showed me how Bitrise handled it which is what I'm doing now. The advantage I observed following my current approach, if you watched the videos, is that I let XCode build the 3 artifacts and during the build step those artifacts are utilized.

Once I went that route I was able to get the apps running on the devices. Rather then beat my head against the wall, I opted to share what I had and hope someone could help clean it up.

As I mentioned in the video series on CI w/ Bitrise.io, the current implementation is just a base line to grow from, it's definitely not the end game - eventually I want Fastlane to do all the work.

If you could enhance our Fastlane implementation I'd be very grateful!

see #26

@DanielMSchmidt
Copy link

Nice to know, we ran into exactly the same issue. The reason was that fastlane somehow didn't found the provisioning profiles it had created earlier. If I remember correctly the ENV line fixed this issue, or am I wrong @dbanck?

If so I would rewrite the fastlane config to use the more verbose approach fastlane provides and add a deploy script to the package.json, so one can easily deploy it from the command line.

@bartonhammond
Copy link
Owner Author

sounds good.

About that push_to_git_remote - are you using the Github webhook to kick of the build? What kicks it off?

@DanielMSchmidt
Copy link

Well, we kick it of manually, this could introduce some kind of recursion in this case. But if the commit messages all have the same format, I think we could easily check if the name of the last commit matches and then ignore it. Or even better check if there is any valid commit since the last build was pushed.

@bartonhammond
Copy link
Owner Author

This can be done manually.

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

No branches or pull requests

2 participants