-
Notifications
You must be signed in to change notification settings - Fork 34
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
Conversation
Signed-off-by: Josh Black <[email protected]>
scripts/on-prem-archive.sh
Outdated
|
||
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]}" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 :)
Signed-off-by: Josh Black <[email protected]>
Closes habitat-sh/builder#326
Signed-off-by: Josh Black [email protected]