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

Provide direct access to git scan Results #31

Closed
arkty opened this issue Dec 29, 2016 · 7 comments
Closed

Provide direct access to git scan Results #31

arkty opened this issue Dec 29, 2016 · 7 comments

Comments

@arkty
Copy link

arkty commented Dec 29, 2016

Hello, I want to add revCount into baseCode. What about adding smth like that:

final Results getResults() {
        if(!this.results) {
            this.results = scan()
        }
        return results
    }
@gladed
Copy link
Collaborator

gladed commented Dec 29, 2016

Including revision count can cause problems with versionCode -- it's pretty easy to end up with the revCount going down when building from different branches, and Android won't install an old version of an app over a new one.

Also, I haven't really exposed Result as a public data structure so it would need to be documented.

Can you tell me a little more about your use case? Maybe there's another way to achieve it.

@arkty
Copy link
Author

arkty commented Dec 30, 2016

@gladed Hello, we are generating versionName as follows:
2.1.3 - where 2.1 is the latest tag and 3 is number of commits after latest tag.
After every master/release build(not tag build) we are uploading new version to Play Store beta, but play store rejects apk if versionCode of new apk is the same as previous.
About different branches - afaik android can install older version, if you are doing it manually(e.x from link).

@gladed
Copy link
Collaborator

gladed commented Jan 3, 2017

Sorry for the delay. I've been thinking about how best to deal with this kind of requirement.

Instead of allowing users to hack the baseCode what about allowing users to specify custom format for the versionCode, much as is done for versionName?

Something like codeFormat="MNNPPPBBBB" which would allocate one digit for Major, two for Minor, three for Patch, and four for Build (i.e. revcount)? (This would leave possibilities for other codes as well for platform, API level, etc.)

Of course this would conflict with baseCode, parts, and multiplier but would ultimately be a lot more flexible and maybe clearer.

Your thoughts, @arkty ?

@arkty
Copy link
Author

arkty commented Jan 9, 2017

@gladed i think this will work for most cases. Good idea! What about multiplier and parts? Will codeFormat broke backward compatibility?

@gladed
Copy link
Collaborator

gladed commented Jan 9, 2017

I will just deprecate them because I like codeFormat much better :) If codeFormat isn't specified I can have parts and multiplier have their traditional behavior so that backwards compatibility isn't broken. baseCode might be able to stick around though.

@arkty
Copy link
Author

arkty commented Jan 9, 2017

@gladed great, you can close this issue, might be better to continue conversation in #27?

@gladed
Copy link
Collaborator

gladed commented Jan 9, 2017

Sounds good.

@gladed gladed closed this as completed Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant