This repository has been archived by the owner on Apr 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IAT: Register and resolve revision assertions (#333)
- Loading branch information
Showing
11 changed files
with
171 additions
and
22 deletions.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module App.Fossa.VSI.IAT.AssertRevisionBinaries ( | ||
assertRevisionBinaries, | ||
) where | ||
|
||
import App.Fossa.FossaAPIV1 qualified as Fossa | ||
import App.Fossa.VSI.IAT.Fingerprint | ||
import Control.Algebra | ||
import Control.Carrier.Diagnostics | ||
import Control.Effect.Lift | ||
import Effect.Logger | ||
import Effect.ReadFS | ||
import Fossa.API.Types | ||
import Path | ||
import Srclib.Types (Locator) | ||
|
||
assertRevisionBinaries :: (Has Diagnostics sig m, Has ReadFS sig m, Has (Lift IO) sig m, Has Logger sig m) => Path Abs Dir -> ApiOpts -> Locator -> m () | ||
assertRevisionBinaries dir apiOpts locator = do | ||
logInfo "Fingerprinting assertion directory contents" | ||
fingerprints <- fingerprintContentsRaw dir | ||
|
||
logInfo "Uploading assertion to FOSSA" | ||
Fossa.assertRevisionBinaries apiOpts locator fingerprints | ||
|
||
pure () |
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
Oops, something went wrong.