standard-version-expo icon indicating copy to clipboard operation
standard-version-expo copied to clipboard

Android converted to semver despite configs & iOS removes leading zeros in semver

Open kungfuchicken opened this issue 4 years ago • 2 comments

Description of the bug

Android version is bumped to semver instead of default android method. iOS version does not respect leading zeros.

To Reproduce

installed and configured per documentation using 1.0.3

configure

// .versionrc.js

module.exports = {
  bumpFiles: [
    {
      filename: 'package.json',
    },
    {
      filename: 'app.json',
      updater: require.resolve('standard-version-expo'),
    },
    {
      filename: 'app.json',
      updater: require.resolve('standard-version-expo/android'),
    },
    {
      filename: 'app.json',
      updater: require.resolve('standard-version-expo/ios'),
    }
  ]
};

run

% npx standard-version --dry-run 
✔ bumping version in package.json from 2.2.4 to 2.2.5
✔ bumping version in app.json from 2.2.4 to 2.2.5
✔ bumping version in app.json from 380020204 to 2.2.5
✔ bumping version in app.json from 2.2.04 to 2.2.5
✔ outputting changes to CHANGELOG.md

---
### 2.2.5 (2020-09-21)
---

✔ committing app.json and package.json and CHANGELOG.md
✔ tagging release v2.2.5
ℹ Run `git push --follow-tags origin CU-buh9bc-trunk-based-ci-cd` to publish

Expected behavior

android would bump to 380020204 iOS would bump to 2.2.05

Actual behavior

android bumpe to 2.2.5 iOS bumped to 2.2.5

kungfuchicken avatar Sep 21 '20 20:09 kungfuchicken

oof... just saw this https://github.com/expo-community/standard-version-expo/issues/10 and verified it's the same issue for me. 🤦🏻 . would still be nice to have higher visibilty to "just ignore dry-run output" and/or an actual fix so the output displays correctly.

kungfuchicken avatar Sep 21 '20 21:09 kungfuchicken

Forgot to mention, but I opened a PR on standard-version to fix the underlying issue: https://github.com/conventional-changelog/standard-version/pull/670

It has been sitting for a while, though. Just rebased.

brettdh avatar Dec 31 '20 03:12 brettdh