From 5ec42c4b87714d3d30aa16e2be15501a17c2cfbc Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Wed, 12 Feb 2014 02:38:28 -0500 Subject: [PATCH 1/3] Create wercker.yml --- wercker.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 wercker.yml diff --git a/wercker.yml b/wercker.yml new file mode 100644 index 000000000..7c64bf0a9 --- /dev/null +++ b/wercker.yml @@ -0,0 +1 @@ +box: wercker/default From f58c3af7393d948840512897009cacf8be9cf29f Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 12 Feb 2014 02:41:23 -0500 Subject: [PATCH 2/3] Add badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ad52bb65..1cc8b9a2f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -gopm - Go Package Manager +gopm - Go Package Manager [![wercker status](https://app.wercker.com/status/899e79d6738e606dab98c915a269d531/s/ "wercker status")](https://app.wercker.com/project/bykey/899e79d6738e606dab98c915a269d531) ========================= ![GPMGo_Logo](https://raw.github.com/gpmgo/gopmweb/master/static/img/gpmgo.png?raw=true) From dd724eb8be6b6eb8088d2649af4c503f80fcf04c Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 12 Mar 2014 05:05:25 -0400 Subject: [PATCH 3/3] Add res section in gopmfile --- cmd/gen.go | 13 ++++++++++++- gopm.go | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cmd/gen.go b/cmd/gen.go index 314a65e9e..1c78171e0 100644 --- a/cmd/gen.go +++ b/cmd/gen.go @@ -41,6 +41,8 @@ Make sure you run this command in the root path of a go project.`, }, } +var commonRes = []string{"views", "templates", "static", "public", "conf"} + func runGen(ctx *cli.Context) { setup(ctx) @@ -55,7 +57,7 @@ func runGen(ctx *cli.Context) { } targetPath := parseTarget(gf.MustValue("target", "path")) - // Get dependencies. + // Get and set dependencies. imports := doc.GetAllImports([]string{workDir}, targetPath, ctx.Bool("example")) log.Log("%v", imports) for _, p := range imports { @@ -71,6 +73,15 @@ func runGen(ctx *cli.Context) { } } + // Get and set resources. + res := make([]string, 0, len(commonRes)) + for _, cr := range commonRes { + if com.IsExist(cr) { + res = append(res, cr) + } + } + gf.SetValue("res", "include", strings.Join(res, "|")) + err = goconfig.SaveConfigFile(gf, ".gopmfile") if err != nil { log.Error("gen", "Fail to save gopmfile:") diff --git a/gopm.go b/gopm.go index 1b454ce47..0695a5ad9 100644 --- a/gopm.go +++ b/gopm.go @@ -29,7 +29,7 @@ import ( // Test that go1.1 tag above is included in builds. main.go refers to this definition. const go11tag = true -const APP_VER = "0.6.3.0311" +const APP_VER = "0.6.3.0312" // //cmd.CmdSearch, // cmdClean,