Cap-go / CLI

CLI to help you to manage your version in capgo cloud
https://capgo.app
GNU Affero General Public License v3.0
18 stars 36 forks source link

Returned the bundle URL from upload command #117

Closed MAYANK-TRIPATH closed 1 year ago

MAYANK-TRIPATH commented 1 year ago

Fixes #116 /claim #116

riderx commented 1 year ago

Thanks for this ! That great job, one thing I should have to make clear is, this URL should be usable by another command, like for example you use upload command in your CI and you want to send to a Slack channel the URL the command returned

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

MAYANK-TRIPATH commented 1 year ago

@riderx Thanks for clearing requirement, I make required changes please look into it.

riderx commented 1 year ago

Thanks for the update, can you document how can this URL can be retrieved as variable for another script, I'm not sure to understand

MAYANK-TRIPATH commented 1 year ago

We have uploadCommand and uploadDeprecatedCommand function, after calling the uploadBundle function , the returned bundleLink URL is stored in the bundleLink variable. Then, the URL is logged to the console using p.log.info(). Using same approach use the bundleLink URL in another script or context. Simply call the uploadBundle function and retrieve the bundleLink URL from the returned value.

MAYANK-TRIPATH commented 1 year ago

@riderx If you want me to add comments in the code, let me know i can do that too.

riderx commented 1 year ago

@MAYANK-TRIPATH thanks for the explanation. While I understand your explanation, I believe you didn't understand my request.

User has to use the CLI he wants to be able to get the URL in an env var or something simple that he can use in next GitHub action or next command. Parsing the output is not convenient. Or at least if you provide a clear explain in the doc how to do it with the regex etc

MAYANK-TRIPATH commented 1 year ago

@riderx Sorry for confusion. As far as i understand You're looking to generate a URL for the uploaded bundle and potentially use it in different contexts, such as CI/CD pipelines or Slack notifications. let me know if i am missing something.

riderx commented 1 year ago

Yes you are right but both step will be done in CI/CD the upload and the slack notif. So upload command should set env or return the URL in easy way for the next CI step

riderx commented 1 year ago

Right now i don't have clue in your changes how the next step will be able to get the URL

MAYANK-TRIPATH commented 1 year ago

Sorry for late reply, actually college exams. For now closing this PR and will do fresh start :)