Use property system to set when an app has been created

This commit is contained in:
esir
2022-09-06 05:14:52 +03:00
committed by Jose Diaz-Gonzalez
parent 4749d1529e
commit 9506ba727e
2 changed files with 8 additions and 4 deletions

View File

@@ -2,7 +2,7 @@ package apps
import (
"fmt"
"os"
"strings"
"github.com/dokku/dokku/plugins/common"
)
@@ -33,12 +33,11 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
}
func reportCreatedAt(appName string) string {
fi, err := os.Stat(common.AppRoot(appName))
createdAt, err := common.PropertyListGet("apps", appName, "created-at")
if err != nil {
return ""
}
return fmt.Sprint(fi.ModTime().Unix())
return fmt.Sprint(strings.Join(createdAt, ","))
}
func reportDeploySource(appName string) string {