alexandermendes / semantic-release-react-native

4 stars 4 forks source link

Can not find path to android/ios projects in monorepo #6

Closed hebadarweesh1 closed 9 months ago

hebadarweesh1 commented 11 months ago

Having a monoRepo project and trying to change the versions in build.gradle and Info.plist but it can not find the files is there a property similar to pkgRoot found in semantic-release ?

[3:52:37 PM] [semantic-release] [semantic-release-react-native] › ℹ Versioning Android [3:52:37 PM] [semantic-release] [semantic-release-react-native] › ✘ No file found at /home/runner/work/client-apps/client-apps/android/app/build.gradle [3:52:37 PM] [semantic-release] [semantic-release-react-native] › ℹ Versioning iOS [3:52:37 PM] [semantic-release] [semantic-release-react-native] › ✘ No Xcode project file found at /home/runner/work/client-apps/client-apps/ios

My configuration file is const config = { branches: ['master'], plugins: [ '@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', [ '@semantic-release/npm', { npmPublish: false, pkgRoot: 'my-app-directory', },], [ 'semantic-release-react-native', { pkgRoot: 'my-app-directory', },], [ '@semantic-release/git', { assets: [ 'my-app-directory/package.json', 'my-app-directory/ios/**/Info.plist', 'my-app-directory/android/app/build.gradle', ], message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}', }, ], '@semantic-release/github', ],}; module.exports = config;

alexandermendes commented 11 months ago

Well there's an androidPath and an iosPath that might work for you, see the readme:

https://github.com/alexandermendes/semantic-release-react-native#configuration

hebadarweesh1 commented 11 months ago

It is working just fine for android and updates the build.gradle. However it shows an error while versioning the iOS.

Directory Hierarchy

image

Configuration file

image

Github error while running CI workflow

image
alexandermendes commented 11 months ago

If you look at the error it seems it doesn't like something about your pbxproj file. Not entirely sure what, will be coming from https://github.com/NativeScript/pbxproj-dom somewhere

chriswickham commented 9 months ago

I'm also experiencing this issue with the following config:

const config = {
  "branches": ['main'],
  "tagFormat": "${version}",
  "plugins": [
    "@semantic-release/commit-analyzer",
    "semantic-release-react-native",
    ['@semantic-release/changelog', { changeLogFile: 'CHANGELOG.md' }],
    [
      "@semantic-release/git",
      {
        "assets": [
          'CHANGELOG.md',
          'package.json',
          "ios/**/Info.plist",
          "android/app/build.gradle",
        ],
        message: 'chore(release): ${nextRelease.version}\n\n${nextRelease.notes}',
      },
    ],
  ]
}

module.exports = config;

Is there a way to skip changes to the pbxproj file?

alexandermendes commented 9 months ago

I expect this is fixed in https://github.com/alexandermendes/semantic-release-react-native/releases/tag/v1.8.3

alexandermendes commented 9 months ago

In fact it didn't, however I'll cover any future updates in https://github.com/alexandermendes/semantic-release-react-native/issues/7, as the original issue in this one was sorted