-
Notifications
You must be signed in to change notification settings - Fork 465
complicated and duplicated configs #161
Comments
You are correct - there are lots of configs out there in the plugin. And maybe some simplification can be done. But in general - they are all quite simple. Will try to answer your questions below. cordova-hcp.json
config.xml
The idea is that you can place chcp.configureThis method will be deprecated and, eventually, removed. At the moment it is used, if you want to set var options = {
'config-file': 'http://myserver.com/chcp.json'
};
chcp.fetchUpdate(function(error, data) {
}, options); So you would not need this configure method. It is already true for iOS (in the repo version), Android is in progress. |
cordova-hcp.jsonSo the reason for this file is, that i don't have to set the config.xmlOk, but then the other thoughtsWouldn't it be possible to move everything in the Thanks ;)Again thank you so much for this plugin - never thought I will find one which works so great like this! |
Yeah, probably it should work. One of the problems right now is that people don't understand why it is changing and how to make it constant.
Yes, that can be implemented.
Yes, I think that's possible. And should also solve problem with Phonegap Build Service removing custom xml tags from Thanks for the ideas! |
Thanks @mnewmedia for the inventory of the configuration files and pointing out this issue. My input on this :
This would replace the I could help with the implementation of the new features if needed. |
@kartsims thanks for the input and suggestion :) I think I'll start with configs simplification myself, and then everyone can help to check that I didn't mess up with that :) And if I did - add PR's with fixes/improvements. Also, have a question to all, since we are talking about simplification. There are two additional preferences in chcp.json: So I would like to remove that preferences as well, plus the JS method. |
Yes I agree, it is not directly related to "hot code pushing" so it could be deprecated... |
Okey, let's wrap it up a bit. I'll describe the changes that should be done in the plugin. Please, check, that I didn't miss anything. Any improvement suggestions are welcomed. What needs to be removed
Plugin configs
CLI client configs
chcp.json formatThe simplest version of the {
"release": "2016.07.05-16.16.51",
"content": "https://yourserver.com"
} where:
As you can see - there is no The extended version will be like this: {
"release": {
"version": "2016.07.05-16.16.51",
"compare": "!= | >",
"min_native_interface": "2"
},
"content": {
"dir": "relative/path | http://content.server.com",
"config": "https://config.server.com/chcp.json"
},
"update_auto_download": {
"enabled": "true | false",
"phase": "onstart | onresume"
},
"update_auto_install": {
"enabled": "true | false",
"phase": "onstart | onresume| ondownload"
}
} release block
content block
update_auto_downloadBy default, plugin will fetch updates from the server when application is launched (
update_auto_installBy default, plugin will install updates when application is launched (
ResultWith theses changes configuration should be a bit simpler and give you more space for maneuver. Also, since the changes are quite big and not backwards compatible - I'm thinking increasing plugin's version to Also, besides just changing the configs - I'll try to add more features to it (like checkForUpdate JS method), but will see. Before adding any new features need to simplify the configs :) Anyway, please, read the above and tell me what you think and what needs to be improved. |
Thanks for the summary. Sounds good to me, and agree with the major version bump. The way I use it though I install/check for updates on Great work, thanks ! |
@kartsims thanks :) Waiting for others to comment as well (if they want, of course :) ). Either way, will jump on the task from tomorrow. |
Sounds perfect but i'm also for defaulting to |
Which file should we add it under VCS(e.g. Git)? |
@robario update: and |
The release.version will be changed every |
Suggestions? |
I have no idea. Sorry. |
I don't think this is an issue because you are supposed to do |
I'd say: let's start with this approach, and then will see. If needed - adjustments will be made during the road. |
I have a thing to be worried about. |
Well, if you are building project on your work machine/build server - timezone is not an issue. You can, actually, put anything you want into |
Yes. The problem occurs only when specify Another solution is including timezone into |
Thanks for the input. I think I'll use UNIX epoch for now, since it's simpler. And then in the future we can add some preference to |
Updated #161 (comment): added |
I would love it if the |
@Manduro added it to the feature list in the CLI client. Thanks for the idea :) |
I actually prefer this (assuming the filenames are consistent) as the I am confused on the proposal for the the
Are you suggesting it is path relative to chcp.json not relative path to chcp.json ? given: the content block would would look like
|
👋 Hi! Thank you for your interest in this repo. 😢 We are not using nordnet/cordova-hot-code-push anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork. 🔒 This will now be closed & locked. ℹ️ Please see #371 for more information. |
Not a bug but just a thread to discuss about making the configuration maybe a bit easier. Above I listed all configuration possibilities with some thoughts on it. Maybe there are reasons behind it i just don't know, cause i didn't look at the code behind it.
project/www/chcp.json
build via build command
project/cordova-hcp.json
contains everything the chcp contains..except the realease. maybe remove this file. And the build command doesn't copy the content from
cordoca-hcp.json
tochcp.json
but just adds or replaces therelease
property ofchcp.json
project/config.xml
Isn't the
<config-file url="" />
ever thecontent_url
+chcp.json
fromchcp.json
? Is there a reason some stuff is inconfig.xml
and some stuff is inchcp.json
?api/chcp.configure (deprecated, new pass it as option in fetchUpdate())
project/chcpbuild.options
Just to have all files listed
project/.chcpignroe
Just to have all files listed
project/.chcpenv
Just to have all files listed
The text was updated successfully, but these errors were encountered: