(appPath string)
| 85 | } |
| 86 | |
| 87 | func isBuildCacheUpToDate(appPath string) (bool, error) { |
| 88 | appName := build.GetAppName(appPath) |
| 89 | |
| 90 | osArch := runtime.GOOS + "-" + runtime.GOARCH |
| 91 | |
| 92 | cachePath, err := tsunamiutil.GetTsunamiAppCachePath("local", appName, osArch) |
| 93 | if err != nil { |
| 94 | return false, err |
| 95 | } |
| 96 | |
| 97 | cacheInfo, err := os.Stat(cachePath) |
| 98 | if err != nil { |
| 99 | if os.IsNotExist(err) { |
| 100 | return false, nil |
| 101 | } |
| 102 | return false, err |
| 103 | } |
| 104 | |
| 105 | appModTime, err := build.GetAppModTime(appPath) |
| 106 | if err != nil { |
| 107 | return false, err |
| 108 | } |
| 109 | |
| 110 | cacheModTime := cacheInfo.ModTime() |
| 111 | return !cacheModTime.Before(appModTime), nil |
| 112 | } |
| 113 | |
| 114 | func (c *TsunamiController) Start(ctx context.Context, blockMeta waveobj.MetaMapType, rtOpts *waveobj.RuntimeOpts, force bool) error { |
| 115 | log.Printf("TsunamiController.Start called for block %s", c.blockId) |
no test coverage detected