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

Android increments are wrong when using prereleases #11

Open
byCedric opened this issue May 4, 2020 · 4 comments
Open

Android increments are wrong when using prereleases #11

byCedric opened this issue May 4, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@byCedric
Copy link
Member

byCedric commented May 4, 2020

Description of the bug

See #10

To Reproduce

  1. npx standard-version --release-as prerelease

Expected behavior

Android increments to be +1

Actual behavior

Something like 1.1.0-0.

Additional context

It's probably related to the semver parsing, but I'll have to investigate.

@byCedric byCedric added the bug Something isn't working label May 4, 2020
@RWOverdijk
Copy link

o/ I just tried releasing a prerelease again which reminded me of this issue.

Any pointers on how I might help resolve this?

@bitttttten
Copy link

I think it's related to how you are using coerce here. If I understand correctly, coerce will force the version into semver and will drop the prerelease tag. Still researching, but it seems we'd need to also get the prerelease tags with prerelease from the semver package, and perhaps do an additional check if there is a prerelease label.

Although I am not sure what versionCode android expects with prereleases, and expo does not let me include the "-beta.0" string in the ios buildNumber!

@RWOverdijk
Copy link

I suppose the build numbers should just increment and the version should remain unaltered except for the first time it runs, where it should be bumped to the next version.

The challenge there is remembering that this happened I suppose, unless you can use the package.json version to verify.

@bitttttten
Copy link

bitttttten commented Jun 13, 2020

That would make sense to me. Although just to make it clear, I am not able to upload a build to play store if it contains the same version code as one already uploaded to the play store. Even though the expo version is different.

My use case is making a beta build for certain closed track or internal testers. And if 0.8.7 is already on the play store, then "0.8.7-beta.0" will not be allowed to be uploaded.

By version I mean version in app.json, and version code is android.versionCode:

// app.json
{
    "expo": {
        "version": "0.8.7-beta.0",
        "android": {
            "versionCode": 370000807
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants