xdeb

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const APPLICATION_NAME = "xdeb-install"
View Source
const LOG_MESSAGE_PREFIX = "[" + APPLICATION_NAME + "]"
View Source
const XDEB_INSTALL_REPOSITORIES_TAG = "v1.0.0"
View Source
const XDEB_INSTALL_REPOSITORIES_URL = "https://raw.githubusercontent.com/thetredev/xdeb-install-repositories/%s/repositories/%s/lists.yaml"
View Source
const XDEB_MASTER_URL = "https://raw.githubusercontent.com/toluschr/xdeb/master/xdeb"
View Source
const XDEB_RELEASE_URL = "https://github.com/toluschr/xdeb/releases/download/%s/xdeb"
View Source
const XDEB_URL = "https://github.com/toluschr/xdeb/releases"

Variables

View Source
var ARCHITECTURE_MAP = map[string]string{
	"amd64": "x86_64",
	"arm64": "aarch64",
	"386":   "i686",
}

Functions

func DownloadFile

func DownloadFile(path string, url string, followRedirects bool, compress bool) (string, error)

func ExecuteCommand

func ExecuteCommand(workdir string, args ...string) error

func FindArchitecture

func FindArchitecture() (string, error)

func InstallPackage

func InstallPackage(packageDefinition *XdebPackageDefinition, context *cli.Context) error

func LogMessage

func LogMessage(format string, args ...any)

func SyncRepositories added in v1.1.0

func SyncRepositories(path string, arch string, providerNames ...string) error

func TrimPathExtension

func TrimPathExtension(path string) string

Types

type PackageListsDefinition

type PackageListsDefinition struct {
	Providers []PackageListsProvider `yaml:"providers"`
}

type PackageListsProvider

type PackageListsProvider struct {
	Name          string   `yaml:"name"`
	Custom        bool     `yaml:"custom"`
	Url           string   `yaml:"url"`
	Architecture  string   `yaml:"architecture"`
	Components    []string `yaml:"components"`
	Distributions []string `yaml:"dists"`
}

type XdebPackageDefinition

type XdebPackageDefinition struct {
	Name         string `yaml:"name"`
	Version      string `yaml:"version"`
	Url          string `yaml:"url"`
	Sha256       string `yaml:"sha256"`
	Path         string `yaml:"path,omitempty"`
	FilePath     string `yaml:"filepath,omitempty"`
	Provider     string `yaml:"provider,omitempty"`
	Distribution string `yaml:"distribution,omitempty"`
	Component    string `yaml:"component,omitempty"`
	IsConfigured bool   `yaml:"is_configured,omitempty"`
}

func FindPackage

func FindPackage(name string, path string, provider string, distribution string) ([]*XdebPackageDefinition, error)

func PackageDefinitionWithMetadata

func PackageDefinitionWithMetadata(packageDefinition *XdebPackageDefinition, path string) *XdebPackageDefinition

func (*XdebPackageDefinition) Configure added in v1.2.1

func (this *XdebPackageDefinition) Configure(rootPath string)

type XdebProviderDefinition

type XdebProviderDefinition struct {
	Xdeb []XdebPackageDefinition `yaml:"xdeb"`
}

func ParseYamlDefinition

func ParseYamlDefinition(path string) (*XdebProviderDefinition, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL