Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
selfupdate fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MickMake committed Jun 12, 2020
1 parent cf686af commit fc37add
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 197 deletions.
93 changes: 73 additions & 20 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 5 additions & 9 deletions cmd/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/newclarity/scribeHelpers/loadTools"
"github.com/newclarity/scribeHelpers/ux"
"github.com/spf13/cobra"
"github.com/wplib/deploywp/defaults"
)

const onlyOnce = "1"
Expand All @@ -13,20 +14,20 @@ var onlyTwice = []string{"", ""}
func init() {
rootCmd.AddCommand(buildCmd)
rootCmd.AddCommand(convertCmd)
rootCmd.AddCommand(helpersCmd)
rootCmd.AddCommand(toolsCmd)
rootCmd.AddCommand(loadCmd)
rootCmd.AddCommand(runCmd)
}


var buildCmd = &cobra.Command{
Use: loadTools.CmdBuild,
Short: ux.SprintfBlue("Build a Pantheon website."),
Long: ux.SprintfBlue("Build a Pantheon website."),
Short: ux.SprintfMagenta(defaults.BinaryName) + ux.SprintfBlue(" - Build a Pantheon website."),
Long: ux.SprintfMagenta(defaults.BinaryName) + ux.SprintfBlue(" - Build a Pantheon website."),
Run: cmdBuild,
}

var helpersCmd = &cobra.Command{
var toolsCmd = &cobra.Command{
Use: loadTools.CmdTools,
Short: ux.SprintfMagenta("scribe") + ux.SprintfBlue(" - Show all built-in template helpers."),
Long: ux.SprintfMagenta("scribe") + ux.SprintfBlue(" - Show all built-in template helpers."),
Expand Down Expand Up @@ -55,8 +56,3 @@ For example: #!/usr/bin/env scribe --json gearbox.json run
`),
Run: cmdRun,
}


func init() {
rootCmd.AddCommand(helpersCmd)
}
161 changes: 0 additions & 161 deletions cmd/runtime/structs.go

This file was deleted.

12 changes: 6 additions & 6 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ var versionCmd = &cobra.Command{
Long: ux.SprintfMagenta(defaults.BinaryName) + ux.SprintfBlue(" - Show version of executable."),
Run: func(cmd *cobra.Command, args []string) {
Cmd.State = ProcessArgs(Cmd, cmd, args)
if Cmd.State.IsNotOk() {
return
}
//if Cmd.State.IsNotOk() {
// return
//}

Cmd.State = Version(args...)
},
Expand All @@ -33,9 +33,9 @@ var selfUpdateCmd = &cobra.Command{
Long: ux.SprintfMagenta(defaults.BinaryName) + ux.SprintfBlue(" - Check and update the latest version."),
Run: func(cmd *cobra.Command, args []string) {
Cmd.State = ProcessArgs(Cmd, cmd, args)
if Cmd.State.IsNotOk() {
return
}
//if Cmd.State.IsNotOk() {
// return
//}

Cmd.State = VersionUpdate()
},
Expand Down
2 changes: 1 addition & 1 deletion defaults/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package defaults

const (
BinaryName = "deploywp"
BinaryVersion = "1.0.0"
BinaryVersion = "1.0.1"
SourceRepo = "github.com/wplib/deploywp"
BinaryRepo = "github.com/wplib/deploywp"
)

0 comments on commit fc37add

Please sign in to comment.