bindown

package module
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: MIT Imports: 12 Imported by: 0

README

bindown

bindown is a command-line utility to download, verify and install binary files. It is intended to be used in development and ci environments where it is important to guarantee the same version of the same binary is downloaded every time.

Usage

 Usage: bindown <command>

Flags:
  --help                            Show context-sensitive help.
  --configfile="buildtools.json"    file with tool definitions
  --cellar-dir=STRING               directory where downloads will be cached

Commands:
  version

  download <target-file>
    download a bin

  config format
    formats the config file

  config update-checksums <target-file>
    name of the binary to update

  config validate <bin>
    validate that downloads work

Run "bindown <command> --help" for more information on a command.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader struct {
	OS          string `json:"os"`
	Arch        string `json:"arch"`
	URL         string `json:"url"`
	Checksum    string `json:"checksum,omitempty"`
	ArchivePath string `json:"archive_path,omitempty"`
	Link        bool   `json:"link,omitempty"`
	BinName     string `json:"bin,omitempty"`

	// Deprecated: use ArchivePath
	MoveFrom string `json:"move-from,omitempty"`

	// Deprecated: use ArchivePath and Link
	LinkSource string `json:"symlink,omitempty"`
}

Downloader downloads a binary

func (*Downloader) ErrString added in v2.1.1

func (d *Downloader) ErrString(binary string) string

ErrString string that represents the downloader in error messages

func (*Downloader) HasChecksum added in v2.1.1

func (d *Downloader) HasChecksum(checksum string) bool

HasChecksum has given checksum

func (*Downloader) Install

func (d *Downloader) Install(downloaderName, cellarDir, targetDir string, force bool) error

Install downloads and installs a bin

func (*Downloader) MatchesArch added in v2.1.1

func (d *Downloader) MatchesArch(arch string) bool

MatchesArch has an Arch value matching arch

func (*Downloader) MatchesOS added in v2.1.1

func (d *Downloader) MatchesOS(opSys string) bool

MatchesOS has an OS value matching opSys

func (*Downloader) UpdateChecksum

func (d *Downloader) UpdateChecksum(cellarDir string) error

UpdateChecksum updates the checksum based on a fresh download

func (*Downloader) Validate added in v2.1.1

func (d *Downloader) Validate(cellarDir string) error

Validate attempts a download to a temp location to validate the download will work as configured.

Directories

Path Synopsis
cmd
bindown command
internal
pkg
config/internal/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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