Coder Social home page Coder Social logo

Output version number together with build number when running `app-store-connect get-latest-testflight-build-number --json` about cli-tools HOT 6 CLOSED

aparajita avatar aparajita commented on June 20, 2024
Output version number together with build number when running `app-store-connect get-latest-testflight-build-number --json`

from cli-tools.

Comments (6)

priitlatt avatar priitlatt commented on June 20, 2024 1

@aparajita This feature is now released and is available in version 0.45.0. More details can be seen from the description of PR #349. Example usages can be seen from this screenshot:
Screenshot 2023-09-15 at 13 41 47

from cli-tools.

priitlatt avatar priitlatt commented on June 20, 2024

Hi @aparajita. As integers are valid JSON data types, then this is actually intended behaviour. Consider the following example:

$ VERSION=$(app-store-connect get-latest-testflight-build-number 1550275619 | jq)
Found build number 10 from TestFlight version 1.0.2
$ echo $VERSION
10

Note informative log lines are written to STDERR stream (by default) and are not captured by piping or variable initialization unless stream redirection is used.

All in all, in case of integer versions there is no difference in JSON and regular output.

from cli-tools.

priitlatt avatar priitlatt commented on June 20, 2024

Actually, on a second thought, there seems to be a bug indeed. As version attribute of PreReleaseVersion and versionString attribute of AppStoreVersion are both strings, then using --json flag should wrap the version in quotes. And in case the build number is not a number, which is completely valid case, then this cannot be piped to JSON parser, say jq, at all as of now:

$ app-store-connect get-latest-testflight-build-number 1481211155 | jq
Found build number 2.0.335.528 from TestFlight version 2.0.335
parse error: Invalid numeric literal at line 2, column 0

from cli-tools.

aparajita avatar aparajita commented on June 20, 2024
Found build number 10 from TestFlight version 1.0.2

Since the tool obviously figures out the version, I was hoping (and kind of expecting) the json output would be like this:

{
  "version": "1.0.2",
  "build": "10"
}

Unless I'm missing something, otherwise to get the corresponding app version we have to explicitly go through the several steps you go through internally to get it.

Would it be possible to add an --include-version option (or something like that) to return the JSON outlined above?

from cli-tools.

priitlatt avatar priitlatt commented on June 20, 2024

Since altering the default behaviour of what --json does would be breaking for existing users, we cannot always include the version info in the output. However, I don't see a reason why this specific action and other similar ones (get-latest-build-number and get-latest-app-store-build-number) couldn't output both version and build number as proposed when additional flag is passed.

from cli-tools.

aparajita avatar aparajita commented on June 20, 2024

Since altering the default behaviour of what --json does would be breaking for existing users

That's why I proposed a new flag. 😁

from cli-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.