From 8cb31700bc8e5b482ddc175ba3dde2dcdbc9e46f Mon Sep 17 00:00:00 2001 From: alimy Date: Wed, 4 Mar 2020 21:27:08 +0800 Subject: [PATCH] change output mirc in pkg mirc --- mirc/.gitignore | 2 +- mirc/Makefile | 2 +- mirc/README.md | 3 ++- mirc/cmd/templates_gen.go | 16 ++++++++-------- mirc/main.go | 2 +- mirc/version/version.go | 7 ++++--- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/mirc/.gitignore b/mirc/.gitignore index 2698ada..5686a3f 100644 --- a/mirc/.gitignore +++ b/mirc/.gitignore @@ -1 +1 @@ -/mir +/mirc diff --git a/mirc/Makefile b/mirc/Makefile index 4e88286..37fc1ba 100644 --- a/mirc/Makefile +++ b/mirc/Makefile @@ -6,7 +6,7 @@ LDFLAGS += -X "github.com/alimy/mir/mirc/v2/version.GitHash=$(shell git rev-pars .PHONY: build build: fmt - go build -ldflags '$(LDFLAGS)' -o mir main.go + go build -ldflags '$(LDFLAGS)' -o mirc main.go .PHONY: generate generate: diff --git a/mirc/README.md b/mirc/README.md index 4688ed2..1c0468d 100644 --- a/mirc/README.md +++ b/mirc/README.md @@ -3,7 +3,8 @@ Mir's help toolkit ### Usage ```bash -% mir new -d example +% go get github.com/alimy/mir/mirc/v2@latest +% mirc new -d example % tree example example ├── Makefile diff --git a/mirc/cmd/templates_gen.go b/mirc/cmd/templates_gen.go index 82175ec..244648d 100644 --- a/mirc/cmd/templates_gen.go +++ b/mirc/cmd/templates_gen.go @@ -379,14 +379,14 @@ type bintree struct { } var _bintree = &bintree{nil, map[string]*bintree{ - "gin_go_mod.tmpl": &bintree{gin_go_modTmpl, map[string]*bintree{}}, - "gin_main.tmpl": &bintree{gin_mainTmpl, map[string]*bintree{}}, - "gin_mirc_main.tmpl": &bintree{gin_mirc_mainTmpl, map[string]*bintree{}}, - "gin_mirc_routes_site.tmpl": &bintree{gin_mirc_routes_siteTmpl, map[string]*bintree{}}, - "gin_mirc_routes_site_v1.tmpl": &bintree{gin_mirc_routes_site_v1Tmpl, map[string]*bintree{}}, - "gin_mirc_routes_site_v2.tmpl": &bintree{gin_mirc_routes_site_v2Tmpl, map[string]*bintree{}}, - "makefile.tmpl": &bintree{makefileTmpl, map[string]*bintree{}}, - "readme.tmpl": &bintree{readmeTmpl, map[string]*bintree{}}, + "gin_go_mod.tmpl": {gin_go_modTmpl, map[string]*bintree{}}, + "gin_main.tmpl": {gin_mainTmpl, map[string]*bintree{}}, + "gin_mirc_main.tmpl": {gin_mirc_mainTmpl, map[string]*bintree{}}, + "gin_mirc_routes_site.tmpl": {gin_mirc_routes_siteTmpl, map[string]*bintree{}}, + "gin_mirc_routes_site_v1.tmpl": {gin_mirc_routes_site_v1Tmpl, map[string]*bintree{}}, + "gin_mirc_routes_site_v2.tmpl": {gin_mirc_routes_site_v2Tmpl, map[string]*bintree{}}, + "makefile.tmpl": {makefileTmpl, map[string]*bintree{}}, + "readme.tmpl": {readmeTmpl, map[string]*bintree{}}, }} // RestoreAsset restores an asset under the given directory. diff --git a/mirc/main.go b/mirc/main.go index e94c4ea..454aed2 100644 --- a/mirc/main.go +++ b/mirc/main.go @@ -11,7 +11,7 @@ import ( func main() { // setup root cli command of application cmd.Setup( - "mir", // command name + "mirc", // command name "mir help toolkit", // command short describe "mir help tookit", // command long describe ) diff --git a/mirc/version/version.go b/mirc/version/version.go index 423ab44..1be6712 100644 --- a/mirc/version/version.go +++ b/mirc/version/version.go @@ -15,7 +15,8 @@ var ( // MircVer version of Mirc var MircVer = semver.Version{ - Major: 0, - Minor: 1, - Patch: 0, + Major: 2, + Minor: 0, + Patch: 0, + PreRelease: "alpha.3", }