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

Rework use of ~ in build.json #48

Open
janpio opened this issue Nov 18, 2018 · 4 comments
Open

Rework use of ~ in build.json #48

janpio opened this issue Nov 18, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@janpio
Copy link
Member

janpio commented Nov 18, 2018

Based on:
apache/cordova-cli#359
apache/cordova-android#563
apache/cordova-docs#909

Conclusion was to not merge any of those PRs, but rework how the support for ~ is implemented. Instead of manually reading env variables, using untildify should be much more stable.

During the discussion also the suggestion came up to support this in all build.json files, not just for cordova-android. (Will have to check if any of those use paths at all, so that it is worth the effort to move this from cordova-android to a more general location.)

@brodycj
Copy link

brodycj commented Nov 18, 2018

@janpio please add apache/cordova-docs#909 to the list you made above.


EDITED & moved to another issue:

There are other Cordova packages where we should consider using untildify or another more portable solution instead of doing our own thing with ~, process.env.HOME, and sometimes process.env.USERPROFILE. Here is what I found so far:

@brodycj brodycj changed the title Rework use of ~ in build.json Rework use of ~ in build.json, etc. Nov 19, 2018
@brodycj
Copy link

brodycj commented Nov 19, 2018

In terms of build.config I do not see Cordova doing anything with ~, process.env.HOME, or process.env.USERPROFILE. I think the explanation is that for iOS and Windows the same OS is always used to do the build.

But I hope we consider using untildify or another more portable solution for cordova-lib and cordova-ios as I suggested in my previous comment, which is now edited. I just added ", etc." to the title to reflect this suggestion.

P.S. I think we should consider using untildify for paths specified in build.config for iOS, macOS ("osx"), and Windows, for the sake of improved consistency:

  • for iOS & macOS ("osx"): path specified in codeSignResourceRules entry
  • for Windows: path specified in packageCertificateKeyFile entry

@janpio
Copy link
Member Author

janpio commented Nov 19, 2018

Thanks for the investigation @brodybits, so it definitely makes sense to use this for all platforms and see if this can be moved out of cordova-android.

For the other uses of HOME and similar, please open a new issue - I disagree that using untildify there would be justified, but don't want to discuss this here. Thanks.

@brodycj brodycj changed the title Rework use of ~ in build.json, etc. Rework use of ~ in build.json Nov 19, 2018
@brodycj
Copy link

brodycj commented Nov 19, 2018

I just raised #49 to propose the other changes, which should not block any of the changes discussed here, and changed the title of this issue back to the original.

@brodycj brodycj added the enhancement New feature or request label Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants