Added a version file to revel/cmd

Updated import path detection to make it smarter. You can now use absolute paths etc..
This commit is contained in:
NotZippy
2018-09-22 13:37:27 -07:00
parent 69e59efb14
commit 7a4e741d1c
11 changed files with 173 additions and 68 deletions

View File

@@ -39,7 +39,7 @@ func init() {
// Called when unable to parse the command line automatically and assumes an old launch
func updatePackageConfig(c *model.CommandConfig, args []string) bool {
c.Index = PACAKAGE
c.Index = model.PACKAGE
if len(args) == 0 {
fmt.Fprintf(os.Stderr, cmdPackage.Long)
return false
@@ -60,7 +60,7 @@ func packageApp(c *model.CommandConfig) {
mode = c.Package.Mode
}
appImportPath := c.Package.ImportPath
appImportPath := c.ImportPath
revel_paths := model.NewRevelPaths(mode, appImportPath, "", model.DoNothingRevelCallback)
// Remove the archive if it already exists.
@@ -75,7 +75,6 @@ func packageApp(c *model.CommandConfig) {
utils.PanicOnError(err, "Failed to get temp dir")
// Build expects the command the build to contain the proper data
c.Build.ImportPath = appImportPath
if len(c.Package.Mode) >= 0 {
c.Build.Mode = c.Package.Mode
}