File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
sbt-plugin/src/main/scala/ch/epfl/scala Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,13 @@ object SubmitDependencyGraph {
82
82
val snapshotUrl = s " ${githubApiUrl()}/repos/ ${githubRepository()}/dependency-graph/snapshots "
83
83
84
84
val snapshotJson = CompactPrinter (Converter .toJsonUnsafe(snapshot))
85
+
86
+ val snapshotJsonFile = IO .withTemporaryFile(" dependency-snapshot-" , " .json" ) { file =>
87
+ IO .write(file, snapshotJson)
88
+ state.log.info(s " Dependency snapshot written to ${file.getAbsolutePath}" )
89
+ file
90
+ }
91
+
85
92
val request = Gigahorse
86
93
.url(snapshotUrl)
87
94
.post(snapshotJson, StandardCharsets .UTF_8 )
@@ -98,7 +105,8 @@ object SubmitDependencyGraph {
98
105
state.log.info(s " Submitted successfully as $snapshotUrl/ ${snapshot.id}" )
99
106
setGithubOutputs(
100
107
" submission-id" -> s " ${snapshot.id}" ,
101
- " submission-api-url" -> s " ${snapshotUrl}/ ${snapshot.id}"
108
+ " submission-api-url" -> s " ${snapshotUrl}/ ${snapshot.id}" ,
109
+ " snapshot-json-path" -> snapshotJsonFile.getAbsolutePath
102
110
)
103
111
state
104
112
}
You can’t perform that action at this time.
0 commit comments