Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

support additional replicated.app upstream formats #846

Merged

Conversation

laverya
Copy link
Member

@laverya laverya commented Feb 26, 2019

What I Did

Support replicated.app/app_name_here formats. If a license ID is required, ship will prompt for it on the command line.

How I Did it

  1. The path after replicated.app/ is now used for customer_id if not provided.
  2. If after querying the API an app is not found, ship will prompt for a license ID and try again.
  3. After prompting for a license ID, the upstream URL within the ship state is modified to include the new license ID.

How to verify it

ship init replicated.app/myappname and follow the prompts

Description for the Changelog

Additional ship app upstream formats are supported.

Picture of a Boat (not required but encouraged)

USS Ozbourn (DD-846)

@laverya laverya requested a review from marccampbell February 26, 2019 23:31
return nil, err
if selector.InstallationID == "" {
debug.Log("event", "spec-resolve", "from", selector, "error", err)
fmt.Printf("Please enter a license id to continue: ")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "Please enter your license to continue: " for this message?

return nil, err
if selector.InstallationID == "" {
debug.Log("event", "spec-resolve", "from", selector, "error", err)
fmt.Printf("Please enter your license to continue: ")
Copy link
Member

@dexhorthy dexhorthy Feb 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use the mitchellh/cli components for prompting elsewhere in this project.

They are a little more succinct, and make this code easily testable

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I'll find that to copy it!

@laverya laverya force-pushed the additional-replicated-app-url-formats branch from 9912285 to 7f23457 Compare February 27, 2019 00:10
@laverya laverya merged commit b090ccc into replicatedhq:master Feb 27, 2019
@laverya laverya deleted the additional-replicated-app-url-formats branch February 27, 2019 00:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants