Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

How to differentiate development/release content-url when using cordova-hcp ? #245

Closed
seme1 opened this issue Nov 1, 2016 · 5 comments
Closed

Comments

@seme1
Copy link

seme1 commented Nov 1, 2016

I'm following the instructions here:
https://github.com/nordnet/cordova-hot-code-push/wiki/Build-options
and have different versions of my app: 1) development version 2) release version. With each version having a unique and different content-url.
When installing the different versions of the app, I use cordova build -- chcp-dev or cordova build -- release as instructed in the above link.

Let's say I did some changes to my JS/HTML code and I would like to deploy the changes to only the development version of my app. I currently use cordova-hcp build and cordova-hcp deploy to deploy the made changes . However, I can't figure out how to direct the changes to only the development/release version of my app.

Is there a parameter such as cordova-hcp build --chcp-dev ?? If not, what is the best option for managing and deploying changes from one code base to different types of builds (dev/release build) ?

@nikDemyankov
Copy link
Member

As I understand, you need two options:

  1. cordova-hcp build --config=dev - to generate configs with dev version of the configs.
  2. cordova-hcp deploy --server=dev - to deploy on the dev server.

Right now cordova-hcp doesn't support that. I'm afraid right now you will have to switch between environments manually.

I'll create a ticket for that feature in the CLI repo.

@seme1
Copy link
Author

seme1 commented Nov 2, 2016

What's the best way for switching between the environments manually ? I was thinking of having two versions of cordova-hcp.json, say cordova-hcp--release.json and cordova-hcp--dev.json.

Before running cordov-hcp build and cordova-hcp deploy, I would make sure the intended cordova-hcp--release/dev.json file would be renamed to cordova-hcp.json and placed in the project root folder.

If the above works (and unless I'm missing something), then a simple batch file can do the files renaming and switch the environments easily from dev to release.

@nikDemyankov
Copy link
Member

Yes, it should be enough. Simple batch file will do the trick.

@seme1
Copy link
Author

seme1 commented Nov 4, 2016

Cool. Thanks.

@nordnet-deprecation-bot
Copy link
Contributor

👋 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.

@nordnet nordnet locked and limited conversation to collaborators Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants