Skip to content

Commit 8e2d030

Browse files
akosyakovroboquat
authored andcommitted
[jetbrains] apply vmoptions while installing plugins
1 parent 493da6c commit 8e2d030

File tree

1 file changed

+15
-11
lines changed
  • components/ide/jetbrains/image/status

1 file changed

+15
-11
lines changed

components/ide/jetbrains/image/status/main.go

+15-11
Original file line numberDiff line numberDiff line change
@@ -82,28 +82,32 @@ func main() {
8282
if err != nil {
8383
log.WithError(err).Error("failed to parse .gitpod.yml")
8484
}
85-
version_2022_1, _ := version.NewVersion("2022.1")
86-
if version_2022_1.LessThanOrEqual(backendVersion) {
87-
err = installPlugins(repoRoot, gitpodConfig, alias)
88-
installPluginsCost := time.Now().Local().Sub(startTime).Milliseconds()
89-
if err != nil {
90-
log.WithError(err).WithField("cost", installPluginsCost).Error("installing repo plugins: done")
91-
} else {
92-
log.WithField("cost", installPluginsCost).Info("installing repo plugins: done")
93-
}
94-
}
9585

86+
// configure vmoptions
9687
idePrefix := alias
9788
if alias == "intellij" {
9889
idePrefix = "idea"
9990
}
10091
// [idea64|goland64|pycharm64|phpstorm64].vmoptions
10192
vmOptionsPath := fmt.Sprintf("/ide-desktop/backend/bin/%s64.vmoptions", idePrefix)
102-
10393
err = configureVMOptions(gitpodConfig, alias, vmOptionsPath)
10494
if err != nil {
10595
log.WithError(err).Error("failed to configure vmoptions")
10696
}
97+
98+
// install project plugins
99+
version_2022_1, _ := version.NewVersion("2022.1")
100+
if version_2022_1.LessThanOrEqual(backendVersion) {
101+
err = installPlugins(repoRoot, gitpodConfig, alias)
102+
installPluginsCost := time.Now().Local().Sub(startTime).Milliseconds()
103+
if err != nil {
104+
log.WithError(err).WithField("cost", installPluginsCost).Error("installing repo plugins: done")
105+
} else {
106+
log.WithField("cost", installPluginsCost).Info("installing repo plugins: done")
107+
}
108+
}
109+
110+
// install gitpod plugin
107111
err = linkRemotePlugin()
108112
if err != nil {
109113
log.WithError(err).Error("failed to install gitpod-remote plugin")

0 commit comments

Comments
 (0)