Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from commitdev/cleanup-and-rename
First pass at renaming and cleaning up old stuff
- Loading branch information
Showing
28 changed files
with
231 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
main-packr.go | ||
packrd | ||
/commit0 | ||
/zero | ||
.history/ | ||
tmp | ||
.vscode | ||
example/ | ||
test-reports/ | ||
.circleci/config-compiled.yml | ||
.circleci/config-compiled.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/commitdev/zero/configs" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var applyConfigPath string | ||
|
||
func init() { | ||
applyCmd.PersistentFlags().StringVarP(&applyConfigPath, "config", "c", configs.CommitYml, "config path") | ||
|
||
rootCmd.AddCommand(applyCmd) | ||
} | ||
|
||
var applyCmd = &cobra.Command{ | ||
Use: "apply", | ||
Short: "Execute modules to create projects, infrastructure, etc.", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
|
||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/commitdev/commit0/internal/config" | ||
"github.com/commitdev/commit0/internal/context" | ||
"github.com/commitdev/commit0/pkg/util/exit" | ||
"github.com/commitdev/zero/configs" | ||
"github.com/commitdev/zero/internal/config" | ||
"github.com/commitdev/zero/internal/generate" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var createConfigPath string | ||
|
||
func init() { | ||
createCmd.PersistentFlags().StringVarP(&createConfigPath, "config", "c", configs.CommitYml, "config path") | ||
|
||
rootCmd.AddCommand(createCmd) | ||
} | ||
|
||
var createCmd = &cobra.Command{ | ||
Use: "create", | ||
Short: "Create new project with provided name.", | ||
Short: "Create directories and render templates based on included modules.", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
if len(args) < 1 { | ||
exit.Fatal("Project name cannot be empty!") | ||
} | ||
|
||
projectName := args[0] | ||
context.Create(projectName, "./") | ||
cfg := config.LoadGeneratorConfig(createConfigPath) | ||
|
||
config.CreateExample(projectName) | ||
generate.GenerateModules(cfg) | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/commitdev/zero/internal/config" | ||
"github.com/commitdev/zero/internal/context" | ||
"github.com/commitdev/zero/pkg/util/exit" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func init() { | ||
rootCmd.AddCommand(initCmd) | ||
} | ||
|
||
var initCmd = &cobra.Command{ | ||
Use: "init", | ||
Short: "Create new project with provided name and initialize configuration based on user input.", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
if len(args) < 1 { | ||
exit.Fatal("Project name cannot be empty!") | ||
} | ||
|
||
projectName := args[0] | ||
context.Create(projectName, "./") | ||
|
||
config.CreateExample(projectName) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.