dev_tools

package
v0.0.0-...-170c358 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(args BuildArgs) (string, error)

Build builds assetbeat using the defined BuildArgs and returns the executable file path.

func CreatePackage

func CreatePackage(spec PackageSpec) error

CreatePackage assetbeat for distribution. It generates packages based on the provided PackageSpec/

func CreateSHA512File

func CreateSHA512File(file string) error

CreateSHA512File computes the sha512 sum of the specified file the writes a sidecar file containing the hash and filename.

func CreateTarball

func CreateTarball(baseFolderName string, outputTarballFilePath string, filePaths []string) error

CreateTarball creates a tar.gz compressed archive from a list of files.

func GenerateDependencyReport

func GenerateDependencyReport(overrides, rules, dependencyReportTemplate string, isSnapshot bool) error

func GenerateNotice

func GenerateNotice(overrides, rules, noticeTemplate string) error

func GetDefaultExtraFiles

func GetDefaultExtraFiles() []string

GetDefaultExtraFiles returns the default list of files to include in an assetbeat package, in addition to assetbeat's executable

func GetPackageArch

func GetPackageArch(goarch string) string

func GetPackageTypes

func GetPackageTypes() []string

GetPackageTypes returns the list of package types to use for packaging/release distribution. By default, it returns the list of supported package types. It can be overridden by setting the TYPES environment variable.

Types

type BuildArgs

type BuildArgs struct {
	// contains filtered or unexported fields
}

func DefaultBuildArgs

func DefaultBuildArgs() BuildArgs

DefaultBuildArgs returns the default BuildArgs for use in builds.

func DefaultCrossBuildArgs

func DefaultCrossBuildArgs(platform Platform) BuildArgs

DefaultCrossBuildArgs returns the default BuildArgs for cross-builds of a specific Platform.

type PackageSpec

type PackageSpec struct {
	Os             string
	Arch           string
	PackageType    string
	ExecutablePath string
	IsSnapshot     bool
	ExtraFilesList []string
}

type Platform

type Platform struct {
	GOOS   string
	GOARCH string
}

func GetPlatforms

func GetPlatforms() []Platform

GetPlatforms return the list of Platform to use for cross-builds. By default, it returns the list of supported platforms. It can be overridden by setting the PLATFORMS environment variable.

Jump to

Keyboard shortcuts

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