code logic for version checkpoints instead of env vars for more optionality (#135)

This commit is contained in:
Lucy C
2023-05-16 16:55:35 -06:00
committed by GitHub
parent 1a1169f371
commit 683b9d1712
8 changed files with 35 additions and 32 deletions

View File

@@ -11,7 +11,7 @@ import Database.Persist.Sql (
SqlBackend,
)
import Lib.Types.Core (
PkgId, OsArch (X86_64, AARCH64),
PkgId, OsArch (X86_64, AARCH64_NONFREE),
)
import Lib.Types.Emver (Version)
import Model (
@@ -330,7 +330,7 @@ upsertPackageVersionPlatform :: (MonadUnliftIO m) => PackageManifest -> ReaderT
upsertPackageVersionPlatform PackageManifest{..} = do
now <- liftIO getCurrentTime
let pkgId = PkgRecordKey packageManifestId
let arches = [X86_64, AARCH64]
let arches = [X86_64 .. AARCH64_NONFREE]
let records = createVersionPlatformRecord now pkgId packageManifestVersion <$> arches
repsertMany records
where