Skip to content

Commit

Permalink
Ensure a version is given to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrildiagne committed Oct 25, 2019
1 parent af57206 commit 16be8ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/app-deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ limitations under the License.
package cmd

import (
"errors"
"fmt"
"os"
"path/filepath"
"strings"

"github.com/cyrildiagne/kuda/pkg/docker"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -62,6 +64,10 @@ func init() {
}

func deploy(app string, appDir string) error {
// Make sure app includes a version tag.
if !strings.Contains(app, ":") {
return errors.New("Missing version tag: app-name:version-tag")
}
// Image to run.
image := viper.GetString("image")
// Command to run.
Expand Down

0 comments on commit 16be8ce

Please sign in to comment.