binary

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INOX_BINARY_PATH             = "/usr/local/bin/inox"
	OLDINOX_BINARY_PATH          = "/usr/local/bin/oldinox"
	TEMPINOX_BINARY_PATH         = "/usr/local/bin/tempinox"
	INOX_REPO_API_ENDPOINT       = "https://api.github.com/repos/inoxlang/inox"
	REPO_TAGS_API_ENDPOINT       = INOX_REPO_API_ENDPOINT + "/tags"
	RELEASE_BY_TAG_API_ENDPOINT  = INOX_REPO_API_ENDPOINT + "/releases/tags"
	BINARY_ARCHIVE_SHA256_PREFIX = ".sha256"

	INOX_BINARY_PERMS = 0o755

	MAX_INOX_BINARY_SIZE = 150_000_000
)

Variables

View Source
var INOX_BINARY_ARCHIVE_GLOB_MATRIX = map[string]map[string]string{
	"linux": {
		"amd64": "*linux-amd64.tar.gz",
	},
}

Functions

func FetchTags

func FetchTags() (tags map[string]repoTagInfo, _ error)

func GetLatestNReleases

func GetLatestNReleases(tags map[string]repoTagInfo, max int) (latestReleases []releaseInfo, err error)

GetLatestNReleases returns the information about the latest max (or less) releases. The most recent release is the first element.

func Upgrade

func Upgrade(outW io.Writer) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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