Fixed build script when it doesn't run on a *curses terminal and dropped hardcoded prefix for package name
This PR provides:
-
A (very dirty) fix for #126. When
androidjs buildis run from a non-interactive terminal (e.g. a Docker build, a Makefile, an F-Droid build, or launched/piped from a non-interactive script) it won't have access to the *curses primitives, and therefore calls to methods such asclearLineandcursorTowill fail. Note however that this is a very dirty fix that simply skips those calls if the methods aren't available, but will still print out a lot of ugly all-on-one-line content that was supposed to be a progress bar. The intent is to open a discussion on what's the best approach to deal with this case - I see two options: either entirely disable theProgressBaroutput if the advanced terminal drawing features are not available, or add some kind of--no-interactiveoption to run the script without terminal drawing options. -
Removed the
com.androidjshardcoded prefix in the manifest generator. Hardcoding the package prefix will almost certainly conflict with thepackage-namespecified on thepackage.jsonand result in failures when trying to upload the app to any store.
@Chhekur this is just a workaround to get things to work, and on a non-interactive terminal this will still print lots of progress bars but without newlines, so it's probably not the right approach. The cleanest approach would probably be to completely disable the progress bar if clearLine or cursorTo are not available.
@Chhekur this is just a workaround to get things to work, and on a non-interactive terminal this will still print lots of progress bars but without newlines, so it's probably not the right approach. The cleanest approach would probably be to completely disable the progress bar if
clearLineorcursorToare not available.
I got your point but the problem is I don't have so much time to actively work on this, right now! if you can fix this in a better way that would be great :)
It was a great proposition. Please, can you provide a similar solution? I'm actually facing a similar problem as his description at the top.
This has been left so long!
@Chhekur please accept this PR or the other PR (https://github.com/android-js/androidjs-builder/pull/66 ), it's a blocker for using AndroidJS in CICD systems.
Issue within this repo that would be fixed: https://github.com/android-js/androidjs-builder/issues/67
Issue within the androidjs repo that could be removed when this is fixed: https://github.com/android-js/androidjs/issues/161