composer

package
v0.0.0-...-dae269f Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotInstalled = errors.New("Composer: Not installed")

Functions

func ModuleName

func ModuleName(spec string) string

ModuleName extracts the module name from a specification. If the module name cannot be found, returns the string unchanged

Types

type Composer

type Composer struct {
	ingredient.Base
	Dependencies struct {
		Barrel *barrel.Barrel
		MStore *mstore.MStore
		Drush  *drush.Drush
	}
}

Drush implements commands related to drush

func (*Composer) Exec

func (composer *Composer) Exec(ctx context.Context, progress io.Writer, command ...string) error

Exec executes a composer command for the main composer package. Returns an error iff composer does not exit with 0.

func (*Composer) ExecWissKI

func (composer *Composer) ExecWissKI(ctx context.Context, progress io.Writer, command ...string) error

Exec executes a composer command for the wisski directory. Returns an error iff composer does not exit with 0.

func (*Composer) FixPermission

func (composer *Composer) FixPermission(ctx context.Context, progress io.Writer) error

FixPermissions fixes the permissions of the sites directory. This needs to be run after every installation of a composer module.

func (*Composer) Install

func (composer *Composer) Install(ctx context.Context, progress io.Writer, args ...string) error

Install attempts runs 'composer require' with the given arguments Spec is like a specification on the command line.

func (*Composer) LastUpdate

func (drush *Composer) LastUpdate(ctx context.Context) (t time.Time, err error)

func (*Composer) TryInstall

func (composer *Composer) TryInstall(ctx context.Context, progress io.Writer, spec string) error

TryInstall attempts to install the given package. If it cannot be installed, returns ErrNotInstalled.

func (*Composer) Update

func (composer *Composer) Update(ctx context.Context, progress io.Writer) (err error)

Update performs a blind drush update

type LastUpdateFetcher

type LastUpdateFetcher struct {
	ingredient.Base
	Dependencies struct {
		Composer *Composer
	}
}

func (*LastUpdateFetcher) Fetch

func (lbr *LastUpdateFetcher) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error)

Jump to

Keyboard shortcuts

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