Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a local tarball to be uploaded instead of fetching from S3 #17

Merged
merged 2 commits into from
Mar 27, 2018

Conversation

raskchanky
Copy link
Contributor

Closes habitat-sh/builder#326

Signed-off-by: Josh Black [email protected]


set -euo pipefail

usage() {
echo "Usage: on-prem-archive.sh {create-archive|populate-depot <DEPOT_URL>}"
echo "Usage: on-prem-archive.sh {create-archive|populate-depot <DEPOT_URL> [PATH_TO_EXISTING_TARBALL]}"
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks fine - one thing that would be useful is to have a command like "download-archive" that can be used to retrieve the latest tarball. Then in the README instructions above, we can tell them to ensure they are using a tarball that has been downloaded using that command.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, minor - create-archive doesn't needs the <DEPOT_URL> param, so that could be marked as optional as well for the usage

Copy link
Contributor Author

@raskchanky raskchanky Mar 26, 2018

Choose a reason for hiding this comment

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

I can add a download-archive command to download the latest tarball.

The create-archive command doesn't take any arguments at all, which is why none are listed 😄 The pipe in the usage means "or", so the way that usage is read is create-archive OR populate-depot <DEPOT_URL> [PATH_TO_EXISTING_TARBALL] with the angle brackets <> denoting required arguments and the square brackets [] denoting optional arguments. If the create-archive command took any arguments, they would appear before the pipe.

These are the same conventions we follow with the hab CLI, and are generally followed by most unix command line utilities. Maybe adding some spaces around the pipe would make this more clear?

Copy link
Contributor

Choose a reason for hiding this comment

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

ah ok, I was reading the usage incorrectly then :)

@chefsalim
Copy link
Contributor

tenor-216042004

@chefsalim chefsalim merged commit fb54501 into master Mar 27, 2018
@chefsalim chefsalim deleted the jb/upload-existing-tarball branch March 27, 2018 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants