Versions in this module Expand all Collapse all v1 v1.20.0 Jul 31, 2022 v1.11.0 Jul 27, 2022 Changes in this version + var BuildnumFlag = flag.String("buildnum", "", `Overrides CI build number`) + var CronJobFlag = flag.Bool("cron-job", false, `Overrides cron job status of the build`) + var DryRunFlag = flag.Bool("n", false, "dry run, don't execute commands") + var GitBranchFlag = flag.String("git-branch", "", `Overrides git branch being built`) + var GitCommitFlag = flag.String("git-commit", "", `Overrides git commit hash embedded into executables`) + var GitTagFlag = flag.String("git-tag", "", `Overrides git tag being built`) + var PullRequestFlag = flag.Bool("pull-request", false, `Overrides pull request status of the build`) + func AddFile(a Archive, file string) error + func AzureBlobstoreDelete(config AzureBlobstoreConfig, blobs []*azblob.BlobItemInternal) error + func AzureBlobstoreList(config AzureBlobstoreConfig) ([]*azblob.BlobItemInternal, error) + func AzureBlobstoreUpload(path string, name string, config AzureBlobstoreConfig) error + func DownloadGo(csdb *ChecksumDB, version string) string + func ExtractArchive(archive string, dest string) error + func FindMainPackages(dir string) []string + func MustRun(cmd *exec.Cmd) + func MustRunCommand(cmd string, args ...string) + func PGPKeyID(pgpkey string) (string, error) + func PGPSignFile(input string, output string, pgpkey string) error + func Render(templateFile, outputFile string, outputPerm os.FileMode, x interface{}) + func RenderString(templateContent, outputFile string, outputPerm os.FileMode, x interface{}) + func RunGit(args ...string) string + func UploadSFTP(identityFile, host, dir string, files []string) error + func WriteArchive(name string, files []string) (err error) + type Archive interface + Close func() error + Directory func(name string) error + Header func(os.FileInfo) (io.Writer, error) + func NewArchive(file *os.File) (Archive, string) + func NewTarballArchive(w io.WriteCloser) Archive + func NewZipArchive(w io.WriteCloser) Archive + type AzureBlobstoreConfig struct + Account string + Container string + Token string + type ChecksumDB struct + func MustLoadChecksums(file string) *ChecksumDB + func (db *ChecksumDB) DownloadFile(url, dstPath string) error + func (db *ChecksumDB) Verify(path string) error + type Environment struct + Branch string + Buildnum string + CI bool + Commit string + Date string + IsCronJob bool + IsPullRequest bool + Name string + Repo string + Tag string + func Env() Environment + func LocalEnv() Environment + func (env Environment) String() string + type GoToolchain struct + CC string + GOARCH string + GOOS string + Root string + func (g *GoToolchain) Go(command string, args ...string) *exec.Cmd + func (g *GoToolchain) Install(gobin string, args ...string) *exec.Cmd + type TarballArchive struct + func (a *TarballArchive) Close() error + func (a *TarballArchive) Directory(name string) error + func (a *TarballArchive) Header(fi os.FileInfo) (io.Writer, error) + type ZipArchive struct + func (a *ZipArchive) Close() error + func (a *ZipArchive) Directory(name string) error + func (a *ZipArchive) Header(fi os.FileInfo) (io.Writer, error) Incompatible versions in this module v2.2.3+incompatible Jul 27, 2022 v2.0.2+incompatible Jul 27, 2022