File tree Expand file tree Collapse file tree 1 file changed +30
-3
lines changed Expand file tree Collapse file tree 1 file changed +30
-3
lines changed Original file line number Diff line number Diff line change 1
- # understack
1
+ # understackctl
2
2
3
- UnderStack CLI helps quickly generate a deployment repository.
3
+ understackctl is a CLI that helps quickly generate a deployment repository.
4
4
5
5
## How to use
6
6
@@ -18,7 +18,7 @@ export UC_DEPLOY_EMAIL="<your_email>"
18
18
export UC_AIO=yes
19
19
```
20
20
21
- * Run
21
+ * Quick Run
22
22
23
23
```
24
24
go run *.go quickstart
@@ -27,6 +27,33 @@ go run *.go help
27
27
28
28
* Commit all changes to the undercloud-deploy repo in your branch
29
29
30
+ ## Build
31
+
32
+ * Local build ` make build ` ( this will only build binary for you local os ).
33
+ * Cross-Platform build ` make build-all ` ( build for linux-mac-windows )
34
+
35
+ ## Development
36
+
37
+ * To add a new command, create a function like this.
38
+
39
+ ``` go
40
+ func NewCmdMyCommand () *cobra .Command {
41
+ return &cobra.Command {
42
+ Use: " mycommand" ,
43
+ Short: " This will run my command" ,
44
+ Long: " This will run my command" ,
45
+ Run: myCommandFunction,
46
+ }
47
+ }
48
+ ```
49
+
50
+ * After that register it to ` cmd/root/root.go `
51
+
52
+ ``` go
53
+ func init () {
54
+ rootCmd.AddCommand (deploy.NewCmdMyCommand ())
55
+ }
56
+ ```
30
57
31
58
## Contributing
32
59
You can’t perform that action at this time.
0 commit comments