build

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2018 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BowerBuilder added in v0.3.0

type BowerBuilder struct {
	NodeCmd     string
	NodeVersion string

	BowerCmd     string
	BowerVersion string
}

BowerBuilder implements Builder for Bower

func (*BowerBuilder) Analyze added in v0.3.0

func (builder *BowerBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)

Analyze reads dependency manifests at `$PROJECT/**/bower_components/*/.bower.json`

func (*BowerBuilder) Build added in v0.3.0

func (builder *BowerBuilder) Build(m module.Module, force bool) error

Build runs `bower install --production` and cleans with `rm -rf bower_components`

func (*BowerBuilder) InferModule added in v0.3.0

func (builder *BowerBuilder) InferModule(target string) (module.Module, error)

InferModule is not implemented

func (*BowerBuilder) Initialize added in v0.3.0

func (builder *BowerBuilder) Initialize() error

Initialize collects metadata on Node and Bower binaries

func (*BowerBuilder) IsBuilt added in v0.3.0

func (builder *BowerBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)

IsBuilt checks for the existence of `$PROJECT/bower_components`

func (*BowerBuilder) IsModule added in v0.3.0

func (builder *BowerBuilder) IsModule(target string) (bool, error)

IsModule is not implemented

type BowerComponent added in v0.3.0

type BowerComponent struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

BowerComponent implements Dependency for BowerBuilder

func (BowerComponent) Fetcher added in v0.3.0

func (m BowerComponent) Fetcher() string

Fetcher always returns bower for BowerComponent

func (BowerComponent) Package added in v0.3.0

func (m BowerComponent) Package() string

Package returns the package name for BowerComponent

func (BowerComponent) Revision added in v0.3.0

func (m BowerComponent) Revision() string

Revision returns the version for BowerComponent

type ComposerBuilder added in v0.3.0

type ComposerBuilder struct {
	PHPCmd     string
	PHPVersion string

	ComposerCmd     string
	ComposerVersion string
}

ComposerBuilder implements Builder for Composer (composer.json) builds

func (*ComposerBuilder) Analyze added in v0.3.0

func (builder *ComposerBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)

Analyze parses the output of `composer show -f json --no-ansi`

func (*ComposerBuilder) Build added in v0.3.0

func (builder *ComposerBuilder) Build(m module.Module, force bool) error

Build runs `composer install --prefer-dist --no-dev` and cleans with `rm -rf vendor`

func (*ComposerBuilder) InferModule added in v0.3.0

func (builder *ComposerBuilder) InferModule(target string) (module.Module, error)

InferModule is not implemented

func (*ComposerBuilder) Initialize added in v0.3.0

func (builder *ComposerBuilder) Initialize() error

Initialize collects metadata on PHP and Composer binaries

func (*ComposerBuilder) IsBuilt added in v0.3.0

func (builder *ComposerBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)

IsBuilt checks whether `composer show --no-ansi` produces output

func (*ComposerBuilder) IsModule added in v0.3.0

func (builder *ComposerBuilder) IsModule(target string) (bool, error)

IsModule is not implemented

type ComposerPackage

type ComposerPackage struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

ComposerPackage implements Dependency for Composer

func (ComposerPackage) Fetcher

func (m ComposerPackage) Fetcher() string

Fetcher always returns comp for ComposerPackage

func (ComposerPackage) Package

func (m ComposerPackage) Package() string

Package returns the package spec for ComposerPackage

func (ComposerPackage) Revision

func (m ComposerPackage) Revision() string

Revision returns the version spec for ComposerPackage

type GoBuilder added in v0.3.0

type GoBuilder struct {
	GoCmd     string
	GoVersion string

	// dep
	DepCmd     string
	DepVersion string

	// glide
	GlideCmd     string
	GlideVersion string

	// godep
	GodepCmd     string
	GodepVersion string

	// govendor
	GovendorCmd     string
	GovendorVersion string

	// vndr
	VndrCmd     string
	VndrVersion string

	// gdm
	GdmCmd     string
	GdmVersion string
}

GoBuilder implements Builder for Golang projects

func (*GoBuilder) Analyze added in v0.3.0

func (builder *GoBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)

Analyze traces imports and then looks up revisions in lockfiles

func (*GoBuilder) Build added in v0.3.0

func (builder *GoBuilder) Build(m module.Module, force bool) error

Build contextually runs a build tool

func (*GoBuilder) InferModule added in v0.3.0

func (builder *GoBuilder) InferModule(target string) (module.Module, error)

InferModule is not implemented

func (*GoBuilder) Initialize added in v0.3.0

func (builder *GoBuilder) Initialize() error

Initialize collects metadata on Go, Dep, Glide, Godep, Govendor, and Vndr binaries.

func (*GoBuilder) IsBuilt added in v0.3.0

func (builder *GoBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)

IsBuilt checks whether imports are traceable and lockfiles are available

func (*GoBuilder) IsModule added in v0.3.0

func (builder *GoBuilder) IsModule(target string) (bool, error)

IsModule is not implemented

type GoPkg added in v0.3.0

type GoPkg struct {
	ImportPath string `json:"name"`
	Version    string `json:"version"` // This is actually the Git revision, but `.Revision()` is already taken by Dependency.
	// contains filtered or unexported fields
}

GoPkg implements Dependency for Golang projects.

func (GoPkg) Fetcher added in v0.3.0

func (g GoPkg) Fetcher() string

Fetcher returns "go".

func (GoPkg) Package added in v0.3.0

func (g GoPkg) Package() string

Package returns the package's import path.

func (GoPkg) Revision added in v0.3.0

func (g GoPkg) Revision() string

Revision returns the package's resolved Git revision.

type MavenArtifact

type MavenArtifact struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

MavenArtifact implements Dependency for Maven builds

func (MavenArtifact) Fetcher

func (m MavenArtifact) Fetcher() string

Fetcher always returns mvn for MavenArtifact

func (MavenArtifact) Package

func (m MavenArtifact) Package() string

Package returns the package spec for MavenArtifact

func (MavenArtifact) Revision

func (m MavenArtifact) Revision() string

Revision returns the version spec for MavenArtifact

type MavenBuilder added in v0.3.0

type MavenBuilder struct {
	JavaCmd     string
	JavaVersion string

	MvnCmd     string
	MvnVersion string
}

MavenBuilder implements Builder for Apache Maven (*.pom.xml) builds

func (*MavenBuilder) Analyze added in v0.3.0

func (builder *MavenBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)

Analyze parses the output of `mvn dependency:list`

func (*MavenBuilder) Build added in v0.3.0

func (builder *MavenBuilder) Build(m module.Module, force bool) error

Build runs `mvn install -DskipTests -Drat.skip=trucould not removee` and cleans with `mvn clean`

func (*MavenBuilder) InferModule added in v0.3.0

func (builder *MavenBuilder) InferModule(target string) (module.Module, error)

InferModule is not implemented

func (*MavenBuilder) Initialize added in v0.3.0

func (builder *MavenBuilder) Initialize() error

Initialize collects metadata on Java and Maven binaries

func (*MavenBuilder) IsBuilt added in v0.3.0

func (builder *MavenBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)

IsBuilt checks whether `mvn dependency:list` produces output.

func (*MavenBuilder) IsModule added in v0.3.0

func (builder *MavenBuilder) IsModule(target string) (bool, error)

IsModule is not implemented

type NodeJSBuilder added in v0.3.0

type NodeJSBuilder struct {
	NodeCmd     string
	NodeVersion string

	NPMCmd     string
	NPMVersion string

	YarnCmd     string
	YarnVersion string
}

NodeJSBuilder implements Builder for Nodejs. These properties are public for the sake of serialization.

func (*NodeJSBuilder) Analyze added in v0.3.0

func (builder *NodeJSBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)

Analyze reads dependency manifests at `$PROJECT/**/node_modules/*/package.json`

func (*NodeJSBuilder) Build added in v0.3.0

func (builder *NodeJSBuilder) Build(m module.Module, force bool) error

Build runs either `yarn install --production --frozen-lockfile` or `npm install --production` and cleans with `rm -rf node_modules`

func (*NodeJSBuilder) InferModule added in v0.3.0

func (builder *NodeJSBuilder) InferModule(target string) (module.Module, error)

InferModule is not implemented

func (*NodeJSBuilder) Initialize added in v0.3.0

func (builder *NodeJSBuilder) Initialize() error

Initialize collects metadata on Node, NPM, and Yarn binaries

func (*NodeJSBuilder) IsBuilt added in v0.3.0

func (builder *NodeJSBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)

IsBuilt checks for the existence of `$PROJECT/node_modules`

func (*NodeJSBuilder) IsModule added in v0.3.0

func (builder *NodeJSBuilder) IsModule(target string) (bool, error)

IsModule is not implemented

type NodeModule added in v0.3.0

type NodeModule struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

NodeModule implements Dependency for NodeJSBuilder.

func (NodeModule) Fetcher added in v0.3.0

func (m NodeModule) Fetcher() string

Fetcher always returns npm for NodeModule. TODO: Support git and other dependency sources.

func (NodeModule) Package added in v0.3.0

func (m NodeModule) Package() string

Package returns the package name for NodeModule

func (NodeModule) Revision added in v0.3.0

func (m NodeModule) Revision() string

Revision returns the version for NodeModule

type RubyBuilder added in v0.3.0

type RubyBuilder struct {
	BundlerCmd     string
	BundlerVersion string

	GemCmd     string
	GemVersion string

	RubyCmd     string
	RubyVersion string
}

RubyBuilder implements Builder for Bundler (Gemfile) builds

func (*RubyBuilder) Analyze added in v0.3.0

func (builder *RubyBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)

Analyze parses the output of `bundler list`

func (*RubyBuilder) Build added in v0.3.0

func (builder *RubyBuilder) Build(m module.Module, force bool) error

Build runs `bundler install --deployment --frozen` and cleans with `rm Gemfile.lock`

func (*RubyBuilder) InferModule added in v0.3.0

func (builder *RubyBuilder) InferModule(target string) (module.Module, error)

InferModule is not implemented

func (*RubyBuilder) Initialize added in v0.3.0

func (builder *RubyBuilder) Initialize() error

Initialize collects metadata on Ruby, Gem, and Bundler binaries

func (*RubyBuilder) IsBuilt added in v0.3.0

func (builder *RubyBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)

IsBuilt checks whether `bundler check` exits with an error

func (*RubyBuilder) IsModule added in v0.3.0

func (builder *RubyBuilder) IsModule(target string) (bool, error)

IsModule is not implemented

type RubyGem

type RubyGem struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

RubyGem implements Dependency for Bundler and RubyGems.

func (RubyGem) Fetcher

func (m RubyGem) Fetcher() string

Fetcher always returns gem for RubyGem

func (RubyGem) Package

func (m RubyGem) Package() string

Package returns the package spec for RubyGem

func (RubyGem) Revision

func (m RubyGem) Revision() string

Revision returns the version spec for RubyGem

type SBTBuilder added in v0.3.0

type SBTBuilder struct {
	SBTCmd     string
	SBTVersion string

	JavaCmd     string
	JavaVersion string
}

SBTBuilder implements build context for SBT builds

func (*SBTBuilder) Analyze added in v0.3.0

func (builder *SBTBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)

Analyze parses the output of `sbt -no-colors dependencyList`

func (*SBTBuilder) Build added in v0.3.0

func (builder *SBTBuilder) Build(m module.Module, force bool) error

Build runs `sbt compile` and cleans with `sbt clean`

func (*SBTBuilder) InferModule added in v0.3.0

func (builder *SBTBuilder) InferModule(target string) (module.Module, error)

InferModule is not implemented

func (*SBTBuilder) Initialize added in v0.3.0

func (builder *SBTBuilder) Initialize() error

Initialize collects metadata on Java and SBT binaries

func (*SBTBuilder) IsBuilt added in v0.3.0

func (builder *SBTBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)

IsBuilt checks whether dependencies are ready for scanning.

func (*SBTBuilder) IsModule added in v0.3.0

func (builder *SBTBuilder) IsModule(target string) (bool, error)

IsModule is not implemented

type SBTLibrary added in v0.3.0

type SBTLibrary struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

SBTLibrary implements Dependency for SBT library dependencies

func (SBTLibrary) Fetcher added in v0.3.0

func (m SBTLibrary) Fetcher() string

Fetcher always returns mvn for SBTLibrary

func (SBTLibrary) Package added in v0.3.0

func (m SBTLibrary) Package() string

Package returns the package spec for SBTLibrary

func (SBTLibrary) Revision added in v0.3.0

func (m SBTLibrary) Revision() string

Revision returns the version spec for SBTLibrary

type VendoredArchiveBuilder added in v0.3.1

type VendoredArchiveBuilder struct {
	RpmCmd     string
	RpmVersion string
}

VendoredArchiveBuilder implements Builder for projects that have archive-formatted rawDependencies encapsulating another supported build system

func (*VendoredArchiveBuilder) Analyze added in v0.3.1

func (builder *VendoredArchiveBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)

Analyze scans for archives and inspects them

func (*VendoredArchiveBuilder) Build added in v0.3.1

func (builder *VendoredArchiveBuilder) Build(m module.Module, force bool) error

Build does nothing for VendoredArchives

func (*VendoredArchiveBuilder) InferModule added in v0.3.1

func (builder *VendoredArchiveBuilder) InferModule(target string) (module.Module, error)

InferModule is not implemented

func (*VendoredArchiveBuilder) Initialize added in v0.3.1

func (builder *VendoredArchiveBuilder) Initialize() error

Initialize gathers environment context.

func (*VendoredArchiveBuilder) IsBuilt added in v0.3.1

func (builder *VendoredArchiveBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)

IsBuilt always returns true assuming vendored deps are already included

func (*VendoredArchiveBuilder) IsModule added in v0.3.1

func (builder *VendoredArchiveBuilder) IsModule(target string) (bool, error)

IsModule is not implemented

Jump to

Keyboard shortcuts

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