-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #331 from tayloraswift/per-edition-builds
track running builds and completed builds separately
- Loading branch information
Showing
86 changed files
with
4,575 additions
and
2,020 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import BSON | ||
import MongoQL | ||
import UnidocRecords | ||
import UnixTime | ||
|
||
extension Unidoc | ||
{ | ||
@frozen public | ||
struct BuildIdentifier:Equatable, Hashable, Sendable | ||
{ | ||
public | ||
let edition:Unidoc.Edition | ||
public | ||
let run:UnixMillisecond | ||
|
||
@inlinable public | ||
init(edition:Unidoc.Edition, run:UnixMillisecond) | ||
{ | ||
self.edition = edition | ||
self.run = run | ||
} | ||
} | ||
} | ||
extension Unidoc.BuildIdentifier:Mongo.MasterCodingModel | ||
{ | ||
@frozen public | ||
enum CodingKey:String, Sendable, BSONDecodable | ||
{ | ||
case edition = "e" | ||
case run = "T" | ||
} | ||
} | ||
extension Unidoc.BuildIdentifier:BSONDocumentEncodable | ||
{ | ||
public | ||
func encode(to bson:inout BSON.DocumentEncoder<CodingKey>) | ||
{ | ||
bson[.edition] = self.edition | ||
bson[.run] = self.run | ||
} | ||
} | ||
extension Unidoc.BuildIdentifier:BSONDocumentDecodable | ||
{ | ||
@inlinable public | ||
init(bson:BSON.DocumentDecoder<CodingKey>) throws | ||
{ | ||
self.init(edition: try bson[.edition].decode(), run: try bson[.run].decode()) | ||
} | ||
} |
Oops, something went wrong.