STRUCT
PluginLocation
Contents
- Properties
type
- Methods
local(path:manifest:)git(url:tag:directory:)git(url:sha:directory:)remote(url:manifest:)remote(urls:manifest:)remote(baseUrl:name:version:os:)
public struct PluginLocation: Codable, EquatableA location to a plugin, either local or remote.
Properties
type
public var type: LocationTypeThe type of location local or git.
Methods
local(path:manifest:)
public static func local(path: FilePath, manifest: PluginConfigManifest? = nil) -> SelfA Path to a directory containing a Plugin manifest.
Example:
.local(path: "/User/local/bin")git(url:tag:directory:)
public static func git(url: String, tag: String, directory: String? = nil) -> SelfA URL to a git repository pointing at a tag. You can also specify a custom directory in case the plugin is not located at the root of the repository. You can also specify a custom release URL from where the plugin binary should be downloaded. If not specified, it defaults to the GitHub release URL. Note that the URL should be publicly reachable.
Example:
.git(url: "https://git/plugin.git", tag: "1.0.0", directory: "PluginDirectory")git(url:sha:directory:)
public static func git(url: String, sha: String, directory: String? = nil) -> SelfA URL to a git repository pointing at a commit sha. You can also specify a custom directory in case the plugin is not located at the root of the repository.
Example:
.git(url: "https://git/plugin.git", sha: "d06b4b3d")remote(url:manifest:)
public static func remote(url: String, manifest: PluginConfigManifest) -> PluginLocationUse remote archive with the plugin.
Example:
.remote(url: "https://s3.example.com/bucket/GekoPlugin/1.0.2/GekoPlugin.macos.geko-plugin.zip"),
.remote(
url: "https://s3.example.com/bucket/SomeArchive/2.5.0/SomeArchive.xcframework.zip",
manifest: .plugin(
name: "some_util",
executables: [
.init(name: "some_util", path: "some_util/bin"),
]
)
),remote(urls:manifest:)
public static func remote(urls: [PluginOS: String], manifest: PluginConfigManifest) -> PluginLocationUse remote plugin archive with different operating systems support.
Example:
.remote(urls: [
.macos: "https://s3.example.com/bucket/GekoPlugin/1.0.2/GekoPlugin.macos.geko-plugin.zip"),
.linux("aarch64"): "https://s3.example.com/bucket/GekoPlugin/1.0.2/GekoPlugin.linux.aarch64.geko-plugin.zip"),
]),
.remote(
urls: [
.macos: "https://s3.example.com/bucket/GekoPlugin/1.0.2/GekoPlugin.macos.geko-plugin.zip"),
.linux("aarch64"): "https://s3.example.com/bucket/GekoPlugin/1.0.2/GekoPlugin.linux.aarch64.geko-plugin.zip"),
],
manifest: .plugin(
name: "some_util",
executables: [
.init(name: "some_util", path: "some_util/bin"),
]
)
),remote(baseUrl:name:version:os:)
public static func remote(baseUrl: String, name: String, version: String, os: [PluginOS] = [.macos]) -> PluginLocationUse remote archive with the plugin.
Example:
// https://s3.example.com/bucket/GekoPlugin/1.0.2/GekoPlugin.macos.geko-plugin.zip
.remote(baseUrl: "https://s3.example.com/bucket", name: "GekoPlugin", version: "1.0.2"),