Skip to content

Commit

Permalink
Add usage function
Browse files Browse the repository at this point in the history
  • Loading branch information
snebel29 committed Jan 13, 2018
1 parent c3d2432 commit 004bcaf
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions bin/gcs-helper.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
#!/bin/bash -e

function usage() {
cat <<' EOF'
Helm plugin for using Google Cloud Storage as a private chart repository
To begin working with helm-gcs plugin, authenticate gcloud
$ gcloud auth login
Usage:
helm gcs init [BUCKET_URL]
helm gcs push [CHART_FILE] [BUCKET_URL]
Available Commands:
init Initialize an existing Cloud Storage Bucket to a Helm repo
push Upload the chart to your bucket
Example:
$ helm gcs init gs://my-unique-helm-repo-bucket-name
$ helm gcs push my-chart-0.1.0.tgz gs://my-unique-helm-repo-bucket-name
EOF
}
COMMAND=$1
case $COMMAND in
Expand Down Expand Up @@ -29,7 +54,6 @@ push)
echo "Repository initialized..."
;;
*)
# TODO turn this into usage()
echo "Please provide a command."
usage
;;
esac

0 comments on commit 004bcaf

Please sign in to comment.