func setTarballInfo(gr *apipb.GameRelease, repo db.TarballRepo) error { tarball, err := repo.Get(gr.GameId, gr.Version) if err != nil { return err } gr.Storage = tarball.Storage gr.ArchiveFormat = tarball.ArchiveFormat return nil }
func initVersion(gr *apipb.GameRelease) { vs := semver.MustParse(gr.Version) version := int64(vs.Patch + (vs.Minor * 1e6) + (vs.Major * 1e12)) gr.IntVersion = version }