mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-22 23:15:18 +00:00
@@ -62,6 +62,7 @@ func buildApp(c *model.CommandConfig) (err error) {
|
|||||||
// Convert target to absolute path
|
// Convert target to absolute path
|
||||||
c.Build.TargetPath, _ = filepath.Abs(destPath)
|
c.Build.TargetPath, _ = filepath.Abs(destPath)
|
||||||
c.Build.Mode = mode
|
c.Build.Mode = mode
|
||||||
|
c.Build.ImportPath = appImportPath
|
||||||
|
|
||||||
revel_paths, err := model.NewRevelPaths(mode, appImportPath, "", model.NewWrappedRevelCallback(nil, c.PackageResolver))
|
revel_paths, err := model.NewRevelPaths(mode, appImportPath, "", model.NewWrappedRevelCallback(nil, c.PackageResolver))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
17
revel/new.go
17
revel/new.go
@@ -307,20 +307,27 @@ const (
|
|||||||
# [[override]]
|
# [[override]]
|
||||||
# name = "github.com/x/y"
|
# name = "github.com/x/y"
|
||||||
# version = "2.4.0"
|
# version = "2.4.0"
|
||||||
required = ["github.com/revel/cmd/revel"]
|
required = ["github.com/revel/revel", "github.com/revel/modules"]
|
||||||
|
|
||||||
|
# Note to use a specific version changes this to
|
||||||
|
#
|
||||||
|
# [[override]]
|
||||||
|
# version = "0.20.1"
|
||||||
|
# name = "github.com/revel/modules"
|
||||||
|
|
||||||
[[override]]
|
[[override]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
name = "github.com/revel/modules"
|
name = "github.com/revel/modules"
|
||||||
|
|
||||||
|
# Note to use a specific version changes this to
|
||||||
|
#
|
||||||
|
# [[override]]
|
||||||
|
# version = "0.20.0"
|
||||||
|
# name = "github.com/revel/revel"
|
||||||
[[override]]
|
[[override]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
name = "github.com/revel/revel"
|
name = "github.com/revel/revel"
|
||||||
|
|
||||||
[[override]]
|
|
||||||
branch = "master"
|
|
||||||
name = "github.com/revel/cmd"
|
|
||||||
|
|
||||||
[[override]]
|
[[override]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
name = "github.com/revel/log15"
|
name = "github.com/revel/log15"
|
||||||
|
|||||||
@@ -12,7 +12,14 @@ func CmdInit(c *exec.Cmd, basePath string) {
|
|||||||
c.Dir = basePath
|
c.Dir = basePath
|
||||||
// Go 1.8 fails if we do not include the GOROOT
|
// Go 1.8 fails if we do not include the GOROOT
|
||||||
c.Env = []string{"GOPATH=" + build.Default.GOPATH, "PATH=" + GetEnv("PATH"), "GOROOT="+ GetEnv("GOROOT")}
|
c.Env = []string{"GOPATH=" + build.Default.GOPATH, "PATH=" + GetEnv("PATH"), "GOROOT="+ GetEnv("GOROOT")}
|
||||||
|
// Fetch the rest of the env variables
|
||||||
|
for _, e := range os.Environ() {
|
||||||
|
pair := strings.Split(e, "=")
|
||||||
|
if pair[0]=="GOPATH" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
c.Env = append(c.Env,e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns an environment variable
|
// Returns an environment variable
|
||||||
|
|||||||
@@ -160,6 +160,9 @@ func PanicOnError(err error, msg string) {
|
|||||||
// Additionally, the trailing ".template" is stripped from the file name.
|
// Additionally, the trailing ".template" is stripped from the file name.
|
||||||
// Also, dot files and dot directories are skipped.
|
// Also, dot files and dot directories are skipped.
|
||||||
func CopyDir(destDir, srcDir string, data map[string]interface{}) error {
|
func CopyDir(destDir, srcDir string, data map[string]interface{}) error {
|
||||||
|
if !DirExists(srcDir) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return fsWalk(srcDir, srcDir, func(srcPath string, info os.FileInfo, err error) error {
|
return fsWalk(srcDir, srcDir, func(srcPath string, info os.FileInfo, err error) error {
|
||||||
// Get the relative path from the source base, and the corresponding path in
|
// Get the relative path from the source base, and the corresponding path in
|
||||||
// the dest directory.
|
// the dest directory.
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ package cmd
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// Version current Revel Command version
|
// Version current Revel Command version
|
||||||
Version = "0.20.1"
|
Version = "0.20.2"
|
||||||
|
|
||||||
// BuildDate latest commit/release date
|
// BuildDate latest commit/release date
|
||||||
BuildDate = "2018-09-30"
|
BuildDate = "2018-10-02"
|
||||||
|
|
||||||
// MinimumGoVersion minimum required Go version for Revel
|
// MinimumGoVersion minimum required Go version for Revel
|
||||||
MinimumGoVersion = ">= go1.8"
|
MinimumGoVersion = ">= go1.8"
|
||||||
|
|||||||
Reference in New Issue
Block a user