-
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.
feat: Switch to download binary on startup (#12)
- Update the plugin to download the binary as required on launch - only happens on first download - Add a button to Update infracost on the settings tab <img width="983" alt="image" src="https://github.com/infracost/jetbrains-infracost/assets/3049157/96554128-7f06-46ac-a2d4-f9eb35f8ece4">
- Loading branch information
1 parent
26ce56a
commit 8712a3c
Showing
18 changed files
with
369 additions
and
261 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html | ||
|
||
pluginGroup = io.infracost.plugins | ||
pluginName = Infracost | ||
pluginRepositoryUrl = https://github.com/infracost/jetbrains-infracost | ||
pluginVersion = 1.1.1 | ||
|
||
pluginSinceBuild = 232 | ||
pluginUntilBuild = 242.* | ||
|
||
platformType = IC | ||
platformVersion = 2023.2.7 | ||
platformPlugins = | ||
gradleVersion = 8.8 | ||
kotlin.stdlib.default.dependency = false | ||
org.gradle.configuration-cache = true | ||
org.gradle.caching = true | ||
pluginGroup=io.infracost.plugins | ||
pluginName=Infracost | ||
pluginRepositoryUrl=https://github.com/infracost/jetbrains-infracost | ||
pluginVersion=1.2.0 | ||
pluginSinceBuild=232 | ||
pluginUntilBuild=242.* | ||
platformType=IC | ||
platformVersion=2023.2.7 | ||
platformPlugins= | ||
gradleVersion=8.8 | ||
kotlin.stdlib.default.dependency=false | ||
org.gradle.configuration-cache=true | ||
org.gradle.caching=true |
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
src/main/kotlin/io/infracost/plugins/infracost/actions/DownloadInfracostAction.kt
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,28 @@ | ||
package io.infracost.plugins.infracost.actions | ||
|
||
import com.intellij.openapi.actionSystem.AnAction | ||
import com.intellij.openapi.actionSystem.AnActionEvent | ||
import com.intellij.openapi.application.ApplicationManager | ||
import com.intellij.openapi.progress.ProgressManager | ||
import com.intellij.openapi.project.Project | ||
import io.infracost.plugins.infracost.actions.tasks.InfracostDownloadBinaryTask | ||
import javax.swing.SwingUtilities | ||
|
||
class DownloadInfracostAction : AnAction() { | ||
|
||
override fun actionPerformed(e: AnActionEvent) { | ||
ProgressManager.getInstance().run(InfracostDownloadBinaryTask(e.project!!, false)) | ||
} | ||
|
||
companion object { | ||
fun runDownload(project: Project, initial: Boolean = false) { | ||
val runner = | ||
InfracostDownloadBinaryTask(project, initial) | ||
if (SwingUtilities.isEventDispatchThread()) { | ||
ProgressManager.getInstance().run(runner) | ||
} else { | ||
ApplicationManager.getApplication().invokeLater(runner) | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.