Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Let Travis build the gallery and push to TestFlight / Play Store #14408

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

Merged
merged 4 commits into from
Feb 5, 2018

Conversation

xster
Copy link
Member

@xster xster commented Feb 1, 2018

@xster xster requested review from Hixie and removed request for Hixie February 1, 2018 01:40
@xster xster changed the title Let Travis build the gallery and push to TestFlight / Play Store [Draft] Let Travis build the gallery and push to TestFlight / Play Store Feb 1, 2018
@xster
Copy link
Member Author

xster commented Feb 1, 2018

Crap, not ready yet. Sharding AND specifying a different programming language (to get the Android SDK etc) is not trivial it seems.


export PATH="$PWD/bin:$PWD/bin/cache/dart-sdk/bin:$PATH"

if [ "$SHARD" != "build_and_deploy_gallery" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

this would probably be clearer if we flipped the if and else clauses around

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

fi

if [ "$TRAVIS_OS_NAME" = "linux" ] && \
[ "$SHARD" = "docs" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

let's put the if shard=docs thing in a chain with the if/else above, and then the os=linux check can go inside that if block

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

int flutterVersionCode = Math.min(flutterVersionComponents[0].toInteger(), 99) * 10000000
flutterVersionCode += Math.min(flutterVersionComponents[1].toInteger(), 99) * 100000
flutterVersionCode += Math.min(flutterVersionComponents[2].toInteger(), 99) * 1000
flutterVersionCode += Math.min(flutterVersionComponents[3]?.toInteger() ?: 0, 999)
Copy link
Contributor

Choose a reason for hiding this comment

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

zz will almost certainly be greater than 99 at some point

Copy link
Contributor

Choose a reason for hiding this comment

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

also, nnn will always be 0 in the cases where we actually publish the gallery, right? if we only publish for dev or beta builds. So maybe we can remove the nnn case, and spread those digits to z and y.

Copy link
Member Author

Choose a reason for hiding this comment

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

I shuffled the digits around just a bit. Unfortunately the play store is a bit yolo about stuff like this and the int value can only go up from this point.

I would also imagine that it should be possible to manually build and deploy from any point in time.

@Hixie
Copy link
Contributor

Hixie commented Feb 1, 2018

RSLGTM, I have no idea what the non-shell things are doing.

@xster xster changed the title [Draft] Let Travis build the gallery and push to TestFlight / Play Store Let Travis build the gallery and push to TestFlight / Play Store Feb 2, 2018
@xster xster merged commit 5b46e0a into flutter:master Feb 5, 2018
@xster xster deleted the fastlane-travis branch February 5, 2018 20:00
int flutterVersionCode = Math.min(flutterVersionComponents[0].toInteger(), 20) * 100000000
flutterVersionCode += Math.min(flutterVersionComponents[1].toInteger(), 99) * 1000000
flutterVersionCode += Math.min(flutterVersionComponents[2].toInteger(), 999) * 1000
flutterVersionCode += Math.min(flutterVersionComponents[3]?.toInteger() ?: 0, 999)
Copy link
Member

@aam aam Feb 6, 2018

Choose a reason for hiding this comment

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

I'm seeing flutter run in flutter gallery failing on this line due to my version file having "unknown" instead of integer in flutterVersionComponents[3]:

╰─➤  cat $FH/flutter/version                                                                                                                                         
0.0.0-unknown
╰─➤  $FH/flutter/bin/flutter doctor -v
[✓] Flutter (on Linux, locale en_US.UTF-8, channel master)
    • Flutter version 0.0.0-unknown at $FH/flutter

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you flutter upgrade and show us the full result of flutter doctor again? I wasn't expecting this version format on the master branch.

DaveShuckerow pushed a commit to DaveShuckerow/flutter that referenced this pull request May 14, 2018
…tter#14408)

* iOS works

* Works on Android

* Take in commit number in iOS also. Get rid of image upload for Android. It's just a waste of bandwidth

* Tweak to fix on Travis
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants