RocketChat / Rocket.Chat.Apps-cli

The CLI for interacting with Rocket.Chat Apps
MIT License
46 stars 27 forks source link

[IMPROVE] Updating existing app without flag #110

Closed lucassartor closed 3 years ago

lucassartor commented 3 years ago

Old behavior: The rc-apps deploy commands will send a request specifically to the /api/apps endpoint with the new app, which errors out if the app already exists. For it to update the app, you need to explicitly use the --update flag.

New behavior: Regardless of the underlying method, the command should be able to determine what endpoint needs to be called, without requiring the --update flag.

Deploying a existing app without the --update flag in the new behavior:

rc-apps deploy --url http://localhost:3000 --username user --password pass 

   Starting App Deployment to Server

   Getting Server Info... ✓
   Packaging the app... ✓
   App already exists - updating it.
   Uploading App... ✓
lucassartor commented 3 years ago

Given that this PR changes the behavior of the rc-apps deploy command, should another PR be made updating the docs.rocket.chat?

thassiov commented 3 years ago

@lucassartor not necessary. It already works as intended EDIT: totally misread the message. YES we do need to update the docs :facepalm: