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

Running 'tns build android --release ...' uses *.debug.* files in build output #2934

Closed
rowandh opened this issue Jun 29, 2017 · 3 comments
Closed
Assignees
Milestone

Comments

@rowandh
Copy link

rowandh commented Jun 29, 2017

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

Yes

Tell us about the problem

I have a solution with config.debug.json and config.release.json. Running 'tns build android --release' copies config.debug.json -> config.json. I expected it to copy config.release.json -> config.json

Which platform(s) does your issue occur on?

Only able to test on Android, but I'd imagine it occurs on both.

Please provide the following version numbers that your issue occurs with:

  • CLI: (run tns --version to fetch it)
    3.1.1

  • Cross-platform modules: (check the 'version' attribute in the
    node_modules/tns-core-modules/package.json file in your project)
    next (3.2.0-2017-06-28-7092)

  • Runtime(s): (look for the "tns-android" and "tns-ios" properties in the
    package.json file of your project)
    "tns-ios": {
    "version": "3.0.1"
    },
    "tns-android": {
    "version": "3.1.1"
    }

  • Plugin(s): (look for the version number in the package.json file of your
    project)
    See https://github.com/rowandh/sample-Groceries/blob/debug-release-bug/package.json

Please tell us how to recreate the issue in as much detail as possible.

My own compiled apk is in the 'apk' folder.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

See https://github.com/rowandh/sample-Groceries/tree/debug-release-bug

@rowandh
Copy link
Author

rowandh commented Jun 29, 2017

Updated because I realised the original config.js files were ignored by the project's .gitignore.

@rowandh rowandh changed the title Running 'tns build android --release ...' uses *.debug.js files in build output Running 'tns build android --release ...' uses *.debug.json files in build output Jun 29, 2017
@rowandh rowandh changed the title Running 'tns build android --release ...' uses *.debug.json files in build output Running 'tns build android --release ...' uses *.debug.* files in build output Jun 29, 2017
@fmsaraujo
Copy link

Can confirm this also happens for iOS builds.

@nadyaA
Copy link
Contributor

nadyaA commented Jul 27, 2017

Hello @rowandh, @fmsaraujo,
The fix is merged and you can use it with nativescript@next.

We implemented the processing of configuration specific files on build, run and debug commands. There was some initial logic to process debug configuration by default, but when configuration is explicitly passed we did not respect it. Now if the passed argument is valid configuration we process specific files, taking the parameter under consideration.
For example - in case you have files called main-view-model.debug.js and main-view-model.release.js , during debug builds the main-view-model.debug.js file will be used , while in release builds the other one will be included in native project.

Thanks for reporting it.

@nadyaA nadyaA added this to the 3.2.0 milestone Jul 27, 2017
@dtopuzov dtopuzov removed the Planned label Aug 3, 2017
@dtopuzov dtopuzov closed this as completed Aug 3, 2017
dtopuzov added a commit to NativeScript/nativescript-cli-tests that referenced this issue Aug 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants