Skip to content

Commit

Permalink
Merge main into feature/q-inlinechat
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-toolkit-automation authored Nov 26, 2024
2 parents 98ba5c3 + 32b4a8a commit a088820
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "Fix(Amazon Q Code Transformation): always show user latest/correct transformation results"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import software.aws.toolkits.core.utils.warn
import software.aws.toolkits.jetbrains.services.codemodernizer.TransformationSummary
import software.aws.toolkits.jetbrains.services.codemodernizer.utils.unzipFile
import java.io.File
import java.util.UUID
import kotlin.io.path.ExperimentalPathApi
import kotlin.io.path.Path
import kotlin.io.path.isDirectory
Expand All @@ -39,7 +40,7 @@ open class CodeModernizerArtifact(

companion object {
private const val MAX_SUPPORTED_VERSION = 1.0
private val tempDir = createTempDirectory("codeTransformArtifacts", null)
private var tempDir = createTempDirectory("codeTransformArtifacts", null)
private const val MANIFEST_FILE_NAME = "manifest.json"
private const val SUMMARY_FILE_NAME = "summary.md"
private const val METRICS_FILE_NAME = "metrics.json"
Expand All @@ -52,6 +53,7 @@ open class CodeModernizerArtifact(
* If anything goes wrong during this process an exception is thrown.
*/
fun create(zipPath: String): CodeModernizerArtifact {
tempDir = createTempDirectory("codeTransformArtifacts-", UUID.randomUUID().toString())
val path = Path(zipPath)
if (path.exists()) {
if (!unzipFile(path, tempDir.toPath())) {
Expand Down

0 comments on commit a088820

Please sign in to comment.