fastlane-old / deliver

Upload screenshots, metadata and your app to the App Store using a single command
https://fastlane.tools
2.24k stars 162 forks source link

* add option for deliver a specific existing build #548

Closed hjanuschka closed 8 years ago

hjanuschka commented 8 years ago

allows deliver to select a specific/existing build number instead of uploading current build binary.

sample:

deliver(
    build_number: "666",
    force: true,
    skip_metadata: true,
    skip_screenshots: true,
    submit_for_review: true
)

to use the latest (already uploaded build on Tunes) - set build_number to latest

KrauseFx commented 8 years ago

Hey @hjanuschka, thanks for this PR. I really like the idea of submitting existing builds for Review, however I think this change adds quite some complexity.

How about we design it as following:

deliver submit_build --build_number 830 --version_number 1.4

while both values are optional.

This command would then only submit the build for review and not upload anything: no metadata, no screenshots and no builds.

What do you think?

hjanuschka commented 8 years ago

thx for the review.

but to be honest, i don't think it ads too much complexity - because it is one parameter, and only if set, just selects a specific build instead of waiting for the upload build.

i think there is room for a use-case where one selects a specific build but also updates screenshots,metadata,releasenots and so on.

hjanuschka commented 8 years ago

@KrauseFx ok rebased the PR - the command

./deliver submit_build —build_number 199 should now work. (there is no usecase for version flag, because i think you can only have one open version train per platform)

and my original implementation also works. :beers:

hjanuschka commented 8 years ago

@KrauseFx

hjanuschka commented 8 years ago

thx @lacostej about the wrong .find() fixed now

hjanuschka commented 8 years ago

@KrauseFx any chances for a review

KrauseFx commented 8 years ago

Reviewing this now. I'd also like the confirmation from @jaleksynas, as he wanted this feature :+1:

jaleksynas commented 8 years ago

I like this feature for certain! it is critical when using decoupled pilot/testflight operations.

As a standalone command does this still work inside the fastlane deliver action as shown at the top of the PR?

My intention is to have a lane that builds, uploads and sends to testing using pilot. (Continuously)

The a user will run a release lane to simply 'deliver' the latest meta-data, screenshots and submit the latest build for review once we bless the latest TestFlight build. I like the meta-data/screenshots to be part of this deliver step because often this content is being updated during testing with testflight.

hjanuschka commented 8 years ago

@jaleksynas like your feedback, thx - going to work on this PR tonight. the feature works as you described - we have exact the same workflow - and it will work from fastfile and from standalone commandline

hjanuschka commented 8 years ago

ok feedback implemented

@KrauseFx if no build is found an exception is raised, if build_number is not latest.

12:30:00]: Activating language de-DE...
[12:30:03]: Uploading metadata to iTunes Connect
[12:30:04]: Successfully uploaded initial set of metadata to iTunes Connect
[12:30:05]: Starting with the upload of screenshots...
[12:30:05]: Successfully uploaded screenshots to iTunes Connect
[12:30:08]: Finished the upload to iTunes Connect
[12:30:09]: Selecting existing build-number: 199
/Users/hja/Desktop/SPORTPORTAL/deliver/lib/deliver/submit_for_review.rb:40:in `select_build': Build number: 199 does not exist (RuntimeError)
    from /Users/hja/Desktop/SPORTPORTAL/deliver/lib/deliver/submit_for_review.rb:5:in `submit!'

so for now you can do via commandline:

deliver submit_build --build_number 199 --force --skip_metadata # if you want to skip metadata for example

via fastfile it will look like this:

deliver(
     build_number: 199,
    force: true,
    skip_metadata: false
)

if no skip param is set, metadata, screenshots and so on will be updated, so i hope this fits your workflow @jaleksynas (we pretty much have the same)

@KrauseFx - mind if you review again?

KrauseFx commented 8 years ago

Hey @hjanuschka, this is great, thank you so much for updating the PR, this looks good already. I added some comments - also it seems like there is a merge conflict.

Thank you so much for all your ongoing contribution and help, really appreciated :tada: :rocket: :sparkles: (3 emojis!)

hjanuschka commented 8 years ago

thx for the review - and for the three emojis!

ping @KrauseFx

KrauseFx commented 8 years ago

Perfect, thank you again for updating the PR and working in the last changes. This will be in the next release :+1: