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

You have to pass a valid version number using the Deliver file. (e.g. 'version "1.0"') #47

Closed
rais38 opened this issue Feb 16, 2015 · 12 comments

Comments

@rais38
Copy link

rais38 commented Feb 16, 2015

I'm trying to send version to TestFlight (iTunes Connect) with this lane:

lane :appstore do
  sigh :skip_install
  system("cd ..; ipa build --verbose --configuration AppStore")
  deliver :skip_deploy, :force, ipa: "../jobandtalent.ipa"
end

And this Deliverfile:

########################################
# App Metadata
########################################

# The app identifier is required
app_identifier "mycompany.identifier"
apple_id "*****"


# This folder has to include one folder for each language
# More information about automatic screenshot upload:
# https://github.com/KrauseFx/deliver#upload-screenshots-to-itunes-connect
screenshots_path "./deliver/screenshots/"


# version '1.2' # you can pass this if you want to verify the version number with the ipa file

config_json_folder './deliver'

success do
  system("say 'Successfully deployed a new version.'")
end

error do |exception|
  # custom exception handling here
  raise "Something went wrong: #{exception}"
end

A few days ago I could upload version without problems ...Now is required to specified the version in Deliverfile?

@rais38
Copy link
Author

rais38 commented Feb 16, 2015

If I include the version in the Deliverfile if it works ... This is correct?

@KrauseFx
Copy link
Member

Well, it should fetch the version number from the ipa file. Looks like deliver has issues detecting the version number.

@KrauseFx
Copy link
Member

Might be caused by too many plist files:

fastlane-old/deliver#73

I need more information about the extracted ipa file to solve this problem.

@rais38
Copy link
Author

rais38 commented Feb 17, 2015

I can see in generated ipa file there are some plist files:

  • For own consumption of the app in the root of .app folder
  • Inside each storyboards of the app
  • In the localization folders (en.lproj, es.lproj...)
  • And only one Info.plist in the root folder with the relevant information CFBundleShortVersionString, CFBundleVersion...

This information can help you?

@patoroco
Copy link
Contributor

Same here with last fastlane version

@KrauseFx
Copy link
Member

Sorry about that, you can pass the version number manually and provide your own automatic detection of the version number using PlistBuddy 😞

@patoroco
Copy link
Contributor

It's possible to send version as parameter? Or we should update DeliverFile programmatically?

@KrauseFx
Copy link
Member

Yes, of course: https://github.com/KrauseFx/deliver/blob/master/Deliverfile.md#version

Just add

version "1.0"

or something like

version File.read("file.txt")

or your own script

@patoroco
Copy link
Contributor

Oh, nice approach! Maybe I'll do one action for that :)

Finally I used these two lines:

FastFile:

before_all do |lane|
system("/usr/libexec/plistbuddy -c Print:CFBundleShortVersionString '../myProject-Info.plist' > ./app_version.txt")
end

DeliverFile (as you said @KrauseFx):

version File.read('./app_version.txt')

In my case, I added fastlane/app_version.txt to my .gitignore, opinions?

@KrauseFx
Copy link
Member

Change it to just

version `"/usr/libexec/plistbuddy -c Print:CFBundleShortVersionString '../myProject-Info.plist'`

and remove the before_all

🚀

@patoroco
Copy link
Contributor

👏

@KrauseFx
Copy link
Member

This is also improved with the latest version 👍

KrauseFx added a commit that referenced this issue Mar 7, 2016
KrauseFx added a commit that referenced this issue Mar 7, 2016
@fastlane fastlane locked and limited conversation to collaborators Sep 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants