utils

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CloneRepo = func(url string) error {
	fmt.Printf("Cloning repository: %s\n", url)

	_, err := git.PlainClone("./temp", false, &git.CloneOptions{
		URL:      url,
		Progress: os.Stdout,
	})

	if err != nil {
		return fmt.Errorf("failed to clone repository: %w", err)
	}

	return nil
}

CloneRepo clones a git repository

View Source
var ReleaseEndpoint = "https://api.github.com/repos/ploycloud/ploy-server-cli/releases/latest"

Functions

func CheckForUpdates

func CheckForUpdates() (string, bool, error)

func FindComposeFile

func FindComposeFile() string

func GetVersion added in v0.5.0

func GetVersion() string

func SelfUpdate

func SelfUpdate() (bool, error)

Types

type GitRelease

type GitRelease struct {
	TagName string `json:"tag_name"`
	Assets  []struct {
		Name        string `json:"name"`
		DownloadURL string `json:"browser_download_url"`
	} `json:"assets"`
}

Jump to

Keyboard shortcuts

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