add architecture to version table; refactor to remove dependency on apps.yaml

This commit is contained in:
Lucy Cifferello
2021-07-02 17:35:20 -04:00
committed by Keagan McClelland
parent 8f20f68c5e
commit d2f8db82cf
10 changed files with 19 additions and 80 deletions

View File

@@ -27,7 +27,7 @@ instance Semigroup (MaxVersion a) where
(MaxVersion (a, f)) <> (MaxVersion (b, g)) = if f a > g b then MaxVersion (a, f) else MaxVersion (b, g)
-- retrieve all valid semver folder names with queried for file: rootDirectory/appId/[0.0.0 ...]/appId.extension
-- TODO move to db query after all appversions are seeded qith post 0.3.0 migration script
-- @TODO move to db query after all appversions are seeded qith post 0.3.0 migration script
getAvailableAppVersions :: KnownSymbol a => FilePath -> Extension a -> IO [RegisteredAppVersion]
getAvailableAppVersions rootDirectory ext@(Extension appId) = do
versions <- mapMaybe (hush . Atto.parseOnly parseVersion . toS) <$> getSubDirectories (rootDirectory </> appId)

View File

@@ -7,7 +7,6 @@ module Lib.Types.Category where
import Startlude
import Database.Persist.Postgresql
import Data.Aeson
import qualified Data.Text as T
import Control.Monad
import Yesod.Core
import Data.String.Interpolate.IsString