mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Compare commits
11 Commits
app.conf-c
...
v0.16.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7eda33eb71 | ||
|
|
1c5fb4a6f8 | ||
|
|
a699dab33d | ||
|
|
e1776bda3c | ||
|
|
d68b27ae81 | ||
|
|
ce84b78204 | ||
|
|
19ca52182d | ||
|
|
bd4663b651 | ||
|
|
d2b1730439 | ||
|
|
0381636044 | ||
|
|
fb3980ce9d |
@@ -88,8 +88,9 @@ func Build(buildFlags ...string) (app *App, compileError *revel.Error) {
|
||||
revel.ImportPath, appVersion, revel.ImportPath, buildTime)
|
||||
|
||||
// TODO remove version check for versionLinkerFlags after Revel becomes Go min version to go1.5
|
||||
goVersion, _ := strconv.ParseFloat(runtime.Version()[2:5], 64)
|
||||
if goVersion < 1.5 {
|
||||
goVersion, err := strconv.ParseFloat(runtime.Version()[2:5], 64)
|
||||
// runtime.Version() may return commit hash, we assume it is above 1.5
|
||||
if goVersion < 1.5 && err == nil {
|
||||
versionLinkerFlags = fmt.Sprintf("-X %s/app.AppVersion \"%s\" -X %s/app.BuildTime \"%s\"",
|
||||
revel.ImportPath, appVersion, revel.ImportPath, buildTime)
|
||||
}
|
||||
@@ -286,7 +287,7 @@ func calcImportAliases(src *SourceInfo) map[string]string {
|
||||
}
|
||||
|
||||
func addAlias(aliases map[string]string, importPath, pkgName string) {
|
||||
alias, ok := aliases[importPath]
|
||||
alias, ok := aliases[importPath]
|
||||
if ok {
|
||||
return
|
||||
}
|
||||
@@ -297,7 +298,7 @@ func addAlias(aliases map[string]string, importPath, pkgName string) {
|
||||
func makePackageAlias(aliases map[string]string, pkgName string) string {
|
||||
i := 0
|
||||
alias := pkgName
|
||||
for containsValue(aliases, alias) {
|
||||
for containsValue(aliases, alias) || alias=="revel" {
|
||||
alias = fmt.Sprintf("%s%d", pkgName, i)
|
||||
i++
|
||||
}
|
||||
|
||||
@@ -97,8 +97,18 @@ func testApp(args []string) {
|
||||
defer cmd.Kill()
|
||||
revel.INFO.Printf("Testing %s (%s) in %s mode\n", revel.AppName, revel.ImportPath, mode)
|
||||
|
||||
var httpAddr = revel.HTTPAddr
|
||||
if httpAddr == "" {
|
||||
httpAddr = "127.0.0.1"
|
||||
}
|
||||
|
||||
var httpProto = "http"
|
||||
if revel.HTTPSsl {
|
||||
httpProto = "https"
|
||||
}
|
||||
|
||||
// Get a list of tests
|
||||
var baseURL = fmt.Sprintf("http://127.0.0.1:%d", revel.HTTPPort)
|
||||
var baseURL = fmt.Sprintf("%s://%s:%d", httpProto, httpAddr, revel.HTTPPort)
|
||||
testSuites, _ := getTestsList(baseURL)
|
||||
|
||||
// If a specific TestSuite[.Method] is specified, only run that suite/test
|
||||
|
||||
Reference in New Issue
Block a user