-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support opening projects in JetBrains IDEs (#186)
Signed-off-by: Toma Puljak <[email protected]>
- Loading branch information
Showing
10 changed files
with
385 additions
and
123 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
// Copyright 2024 Daytona Platforms Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package jetbrains | ||
|
||
func GetIdes() map[Id]Ide { | ||
return map[Id]Ide{ | ||
CLion: clion, | ||
IntelliJ: intellij, | ||
GoLand: goland, | ||
PyCharm: pycharm, | ||
PhpStorm: phpstorm, | ||
WebStorm: webstorm, | ||
Rider: rider, | ||
RubyMine: rubymine, | ||
} | ||
} | ||
|
||
var clion = Ide{ | ||
Name: "CLion", | ||
Version: "2023.2.2", | ||
UrlTemplates: UrlTemplates{ | ||
Amd64: "https://download.jetbrains.com/cpp/CLion-%s.tar.gz", | ||
Arm64: "https://download.jetbrains.com/cpp/CLion-%s-aarch64.tar.gz", | ||
}, | ||
} | ||
|
||
var intellij = Ide{ | ||
Name: "IntelliJ IDEA Ultimate", | ||
Version: "2023.2.2", | ||
UrlTemplates: UrlTemplates{ | ||
Amd64: "https://download.jetbrains.com/idea/ideaIU-%s.tar.gz", | ||
Arm64: "https://download.jetbrains.com/idea/ideaIU-%s-aarch64.tar.gz", | ||
}, | ||
} | ||
|
||
var goland = Ide{ | ||
Name: "GoLand", | ||
Version: "2023.2.2", | ||
UrlTemplates: UrlTemplates{ | ||
Amd64: "https://download.jetbrains.com/go/goland-%s.tar.gz", | ||
Arm64: "https://download.jetbrains.com/go/goland-%s-aarch64.tar.gz", | ||
}, | ||
} | ||
|
||
var pycharm = Ide{ | ||
Name: "PyCharm Professional", | ||
Version: "2023.2.2", | ||
UrlTemplates: UrlTemplates{ | ||
Amd64: "https://download.jetbrains.com/python/pycharm-professional-%s.tar.gz", | ||
Arm64: "https://download.jetbrains.com/python/pycharm-professional-%s-aarch64.tar.gz", | ||
}, | ||
} | ||
|
||
var phpstorm = Ide{ | ||
Name: "PhpStorm", | ||
Version: "2023.2.2", | ||
UrlTemplates: UrlTemplates{ | ||
Amd64: "https://download.jetbrains.com/webide/PhpStorm-%s.tar.gz", | ||
Arm64: "https://download.jetbrains.com/webide/PhpStorm-%s-aarch64.tar.gz", | ||
}, | ||
} | ||
|
||
var webstorm = Ide{ | ||
Name: "WebStorm", | ||
Version: "2023.2.2", | ||
UrlTemplates: UrlTemplates{ | ||
Amd64: "https://download.jetbrains.com/webstorm/WebStorm-%s.tar.gz", | ||
Arm64: "https://download.jetbrains.com/webstorm/WebStorm-%s-aarch64.tar.gz", | ||
}, | ||
} | ||
|
||
var rider = Ide{ | ||
Name: "Rider", | ||
Version: "2023.2.2", | ||
UrlTemplates: UrlTemplates{ | ||
Amd64: "https://download.jetbrains.com/rider/JetBrains.Rider-%s.tar.gz", | ||
Arm64: "https://download.jetbrains.com/rider/JetBrains.Rider-%s-aarch64.tar.gz", | ||
}, | ||
} | ||
|
||
var rubymine = Ide{ | ||
Name: "RubyMine", | ||
Version: "2023.2.2", | ||
UrlTemplates: UrlTemplates{ | ||
Amd64: "https://download.jetbrains.com/ruby/RubyMine-%s.tar.gz", | ||
Arm64: "https://download.jetbrains.com/ruby/RubyMine-%s-aarch64.tar.gz", | ||
}, | ||
} |
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 @@ | ||
// Copyright 2024 Daytona Platforms Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package jetbrains | ||
|
||
type Ide struct { | ||
Name string | ||
Version string | ||
UrlTemplates UrlTemplates | ||
} | ||
|
||
type UrlTemplates struct { | ||
Amd64 string | ||
Arm64 string | ||
} | ||
|
||
type Id string | ||
|
||
const ( | ||
CLion Id = "clion" | ||
IntelliJ Id = "intellij" | ||
GoLand Id = "goland" | ||
PyCharm Id = "pycharm" | ||
PhpStorm Id = "phpstorm" | ||
WebStorm Id = "webstorm" | ||
Rider Id = "rider" | ||
RubyMine Id = "rubymine" | ||
) |
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,21 @@ | ||
// Copyright 2024 Daytona Platforms Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package util | ||
|
||
import ( | ||
"os/exec" | ||
|
||
"github.com/daytonaio/daytona/pkg/os" | ||
) | ||
|
||
func GetRemoteOS(remote string) (*os.OperatingSystem, error) { | ||
unameCmd := exec.Command("ssh", remote, "uname -a") | ||
|
||
output, err := unameCmd.Output() | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return os.OSFromUnameA(string(output)) | ||
} |
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.