deploywp

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Simple Ux.Print indenting mechanism.

Index

Constants

View Source
const (
	DestinationActionCopy    = "copy"
	DestinationActionDelete  = "delete"
	DestinationActionExclude = "exclude"
	DestinationActionKeep    = "keep"
)
View Source
const DefaultDestinationBasePath = "/tmp/deploywp"
View Source
const ToolPrefix = "Tool"

Variables

View Source
var Consts = map[string]reflect.Value{
	"DefaultDestinationBasePath": reflect.ValueOf(DefaultDestinationBasePath),
	"DestinationActionCopy":      reflect.ValueOf(DestinationActionCopy),
	"DestinationActionDelete":    reflect.ValueOf(DestinationActionDelete),
	"DestinationActionExclude":   reflect.ValueOf(DestinationActionExclude),
	"DestinationActionKeep":      reflect.ValueOf(DestinationActionKeep),
	"ToolPrefix":                 reflect.ValueOf(ToolPrefix),
}
View Source
var Functions = map[string]reflect.Value{
	"GetStructTag":       reflect.ValueOf(GetStructTag),
	"IsValidVersionType": reflect.ValueOf(IsValidVersionType),
	"ReflectDeployWp":    reflect.ValueOf(ReflectDeployWp),
	"ToolBuildDeployWp":  reflect.ValueOf(ToolBuildDeployWp),
	"ToolLoadDeployWp":   reflect.ValueOf(ToolLoadDeployWp),
}
View Source
var Types = map[string]reflect.Type{
	"Build":              reflect.TypeOf((*Build)(nil)).Elem(),
	"Defaults":           reflect.TypeOf((*Defaults)(nil)).Elem(),
	"DefaultsPaths":      reflect.TypeOf((*DefaultsPaths)(nil)).Elem(),
	"DefaultsRepository": reflect.TypeOf((*DefaultsRepository)(nil)).Elem(),
	"DeployWpGetter":     reflect.TypeOf((*DeployWpGetter)(nil)).Elem(),
	"Destination":        reflect.TypeOf((*Destination)(nil)).Elem(),
	"Files":              reflect.TypeOf((*Files)(nil)).Elem(),
	"FilesArray":         reflect.TypeOf((*FilesArray)(nil)).Elem(),
	"Host":               reflect.TypeOf((*Host)(nil)).Elem(),
	"Hosts":              reflect.TypeOf((*Hosts)(nil)).Elem(),
	"Meta":               reflect.TypeOf((*Meta)(nil)).Elem(),
	"Paths":              reflect.TypeOf((*Paths)(nil)).Elem(),
	"Provider":           reflect.TypeOf((*Provider)(nil)).Elem(),
	"Providers":          reflect.TypeOf((*Providers)(nil)).Elem(),
	"Repository":         reflect.TypeOf((*Repository)(nil)).Elem(),
	"Revision":           reflect.TypeOf((*Revision)(nil)).Elem(),
	"Source":             reflect.TypeOf((*Source)(nil)).Elem(),
	"State":              reflect.TypeOf((*State)(nil)).Elem(),
	"String":             reflect.TypeOf((*String)(nil)).Elem(),
	"Target":             reflect.TypeOf((*Target)(nil)).Elem(),
	"Targets":            reflect.TypeOf((*Targets)(nil)).Elem(),
	"ToolDeployWp":       reflect.TypeOf((*ToolDeployWp)(nil)).Elem(),
	"TypeDeployWp":       reflect.TypeOf((*TypeDeployWp)(nil)).Elem(),
	"URL":                reflect.TypeOf((*URL)(nil)).Elem(),
	"UxPrint":            reflect.TypeOf((*UxPrint)(nil)).Elem(),
	"Wordpress":          reflect.TypeOf((*Wordpress)(nil)).Elem(),
}
View Source
var Variables = map[string]reflect.Value{
	"GetTools": reflect.ValueOf(&GetTools),
}

Functions

func GetStructTag added in v1.0.2

func GetStructTag(ref interface{}, name string) string

func IsValidVersionType

func IsValidVersionType(t string) bool

func ToolBuildDeployWp added in v1.0.2

func ToolBuildDeployWp(str interface{}, args []string) string

Types

type Build

type Build struct {
	Empty bool

	Valid bool
	// contains filtered or unexported fields
}

func (*Build) GetBuild

func (b *Build) GetBuild() bool

func (*Build) IsNil

func (b *Build) IsNil() *ux.State

func (*Build) IsNotValid added in v1.0.2

func (b *Build) IsNotValid() bool

func (*Build) IsValid added in v1.0.2

func (b *Build) IsValid() bool

func (*Build) New

func (b *Build) New(runtime *toolRuntime.TypeRuntime) *Build

type Defaults

type Defaults struct {
	Paths      DefaultsPaths      `json:"paths"`
	Repository DefaultsRepository `json:"repository"`

	Valid bool
	// contains filtered or unexported fields
}

func (*Defaults) IsNotValid added in v1.0.2

func (d *Defaults) IsNotValid() bool

func (*Defaults) IsValid added in v1.0.2

func (d *Defaults) IsValid() bool

func (*Defaults) New

func (d *Defaults) New(runtime *toolRuntime.TypeRuntime) *Defaults

type DefaultsPaths

type DefaultsPaths struct {
	WebrootDir string `json:"webroot_dir" mapstructure:"webroot_dir"`
}

func (*DefaultsPaths) IsNotValid added in v1.0.2

func (d *DefaultsPaths) IsNotValid() bool

func (*DefaultsPaths) IsValid added in v1.0.2

func (d *DefaultsPaths) IsValid() bool

type DefaultsRepository

type DefaultsRepository struct {
	URL string `json:"url"`
}

func (*DefaultsRepository) IsNotValid added in v1.0.2

func (d *DefaultsRepository) IsNotValid() bool

func (*DefaultsRepository) IsValid added in v1.0.2

func (d *DefaultsRepository) IsValid() bool

type DeployWpGetter

type DeployWpGetter interface {
}

type Destination added in v1.0.2

type Destination struct {
	Files     Files     `json:"files"`
	Paths     Paths     `json:"paths"`
	Providers Providers `json:"providers"` // mapstructure:",squash"`
	Targets   Targets   `json:"targets"`   // mapstructure:",squash"`

	AbsPaths Paths
	AbsFiles Files

	Valid bool
	// contains filtered or unexported fields
}

func (*Destination) GetBasePath added in v1.0.2

func (d *Destination) GetBasePath() string

func (*Destination) GetFiles added in v1.0.2

func (d *Destination) GetFiles(ftype string) *FilesArray

//////////////////////////////////////////////////////////////////////////////// Files

func (*Destination) GetPaths added in v1.0.2

func (d *Destination) GetPaths(abs ...interface{}) *Paths

//////////////////////////////////////////////////////////////////////////////// Paths

func (*Destination) GetProviderByName added in v1.0.2

func (d *Destination) GetProviderByName(provider string) *Provider

//////////////////////////////////////////////////////////////////////////////// Providers

func (*Destination) GetProviderBySiteId added in v1.0.2

func (d *Destination) GetProviderBySiteId(siteId string) *Provider

func (*Destination) GetSelectedHost added in v1.0.2

func (d *Destination) GetSelectedHost() *Host

func (*Destination) GetTargetByHost added in v1.0.2

func (d *Destination) GetTargetByHost(host string) *Target

//////////////////////////////////////////////////////////////////////////////// Revisions

func (*Destination) GetTargetByName added in v1.0.2

func (d *Destination) GetTargetByName(ref string) *Target

func (*Destination) IsNil added in v1.0.2

func (d *Destination) IsNil() *ux.State

func (*Destination) IsNotValid added in v1.0.2

func (d *Destination) IsNotValid() bool

func (*Destination) IsValid added in v1.0.2

func (d *Destination) IsValid() bool

func (*Destination) New added in v1.0.2

func (d *Destination) New(runtime *toolRuntime.TypeRuntime) *Destination

func (*Destination) Process added in v1.0.2

func (d *Destination) Process() *ux.State

func (*Destination) SetDestinationHost added in v1.0.2

func (d *Destination) SetDestinationHost(host *Host) *ux.State

type Files

type Files struct {
	Copy    FilesArray `json:"copy"`    // mapstructure:",squash"`
	Delete  FilesArray `json:"delete"`  // mapstructure:",squash"`
	Exclude FilesArray `json:"exclude"` // mapstructure:",squash"`
	Keep    FilesArray `json:"keep"`    // mapstructure:",squash"`

	Valid bool
	// contains filtered or unexported fields
}

func (*Files) GetCopyFiles

func (f *Files) GetCopyFiles() *FilesArray

func (*Files) GetDeleteFiles

func (f *Files) GetDeleteFiles() *FilesArray

func (*Files) GetExcludeFiles

func (f *Files) GetExcludeFiles() *FilesArray

func (*Files) GetFiles

func (f *Files) GetFiles(action string) *FilesArray

func (*Files) GetKeepFiles

func (f *Files) GetKeepFiles() *FilesArray

func (*Files) IsNil

func (f *Files) IsNil() *ux.State

func (*Files) IsNotValid added in v1.0.2

func (f *Files) IsNotValid() bool

func (*Files) IsValid added in v1.0.2

func (f *Files) IsValid() bool

func (*Files) New

func (f *Files) New(runtime *toolRuntime.TypeRuntime) *Files

func (*Files) Process

func (f *Files) Process(paths Paths) *ux.State

type FilesArray

type FilesArray []string
type FilesArray struct{
	Array []string `json:"array"`

	Valid   bool
	runtime *toolRuntime.TypeRuntime
	state   *ux.State
}

func (*FilesArray) Append added in v1.0.2

func (fa *FilesArray) Append(add *FilesArray)

func (*FilesArray) IsNotValid added in v1.0.2

func (fa *FilesArray) IsNotValid() bool

func (*FilesArray) IsValid added in v1.0.2

func (fa *FilesArray) IsValid() bool

func (*FilesArray) New

func (fa *FilesArray) New(runtime *toolRuntime.TypeRuntime) *FilesArray

func (*FilesArray) Process

func (fa *FilesArray) Process(runtime *toolRuntime.TypeRuntime) *ux.State

type Host

type Host struct {
	HostName string `json:"host_name" mapstructure:"host_name"`
	Label    string `json:"label"`
	Provider string `json:"provider"`

	Valid bool
	// contains filtered or unexported fields
}

func (*Host) IsNil

func (h *Host) IsNil() *ux.State

func (*Host) IsNotValid added in v1.0.2

func (h *Host) IsNotValid() bool

func (*Host) IsValid added in v1.0.2

func (h *Host) IsValid() bool

func (*Host) New

func (h *Host) New(runtime *toolRuntime.TypeRuntime) *Host

type Hosts

type Hosts []Host

func (*Hosts) Count

func (h *Hosts) Count() int

func (*Hosts) GetByName

func (h *Hosts) GetByName(host string) *Host

func (*Hosts) GetByProvider

func (h *Hosts) GetByProvider(provider string) *Host

func (*Hosts) IsNotValid added in v1.0.2

func (h *Hosts) IsNotValid() bool

func (*Hosts) IsValid added in v1.0.2

func (h *Hosts) IsValid() bool

func (*Hosts) New

func (h *Hosts) New(runtime *toolRuntime.TypeRuntime) *Hosts

func (*Hosts) Process

func (h *Hosts) Process(runtime *toolRuntime.TypeRuntime) *ux.State

type Meta

type Meta struct {
	SiteID   string `json:"site_id" mapstructure:"site_id"`
	SiteName string `json:"site_name" mapstructure:"site_name"`

	Valid bool
	// contains filtered or unexported fields
}

func (*Meta) IsNil

func (m *Meta) IsNil() *ux.State

func (*Meta) IsNotValid added in v1.0.2

func (m *Meta) IsNotValid() bool

func (*Meta) IsValid added in v1.0.2

func (m *Meta) IsValid() bool

func (*Meta) New

func (m *Meta) New(runtime *toolRuntime.TypeRuntime) *Meta

func (*Meta) Process

func (m *Meta) Process(runtime *toolRuntime.TypeRuntime) *ux.State

type Paths

type Paths struct {
	BasePath    string    `json:"base_path" mapstructure:"base_path"`
	WebrootPath string    `json:"webroot_path" mapstructure:"webroot_path"`
	Wordpress   Wordpress `json:"wordpress"`

	Valid bool
	// contains filtered or unexported fields
}

func (*Paths) AppendBasePath added in v1.0.2

func (p *Paths) AppendBasePath(s ...string) *ux.State

func (*Paths) AppendContentPath added in v1.0.2

func (p *Paths) AppendContentPath(s ...string) *ux.State

func (*Paths) AppendCorePath added in v1.0.2

func (p *Paths) AppendCorePath(s ...string) *ux.State

func (*Paths) AppendRootPath added in v1.0.2

func (p *Paths) AppendRootPath(s ...string) *ux.State

func (*Paths) AppendVendorPath added in v1.0.2

func (p *Paths) AppendVendorPath(s ...string) *ux.State

func (*Paths) AppendWebRootPath added in v1.0.2

func (p *Paths) AppendWebRootPath(s ...string) *ux.State

func (*Paths) ExpandPaths

func (p *Paths) ExpandPaths() *ux.State

func (*Paths) GetBasePath

func (p *Paths) GetBasePath() string

func (*Paths) GetContentPath

func (p *Paths) GetContentPath(absolute bool) string

func (*Paths) GetCorePath

func (p *Paths) GetCorePath(absolute bool) string

func (*Paths) GetRootPath

func (p *Paths) GetRootPath(absolute bool) string

func (*Paths) GetVendorPath

func (p *Paths) GetVendorPath(absolute bool) string

func (*Paths) GetWebRootPath

func (p *Paths) GetWebRootPath(absolute bool) string

func (*Paths) IsNil

func (p *Paths) IsNil() *ux.State

func (*Paths) IsNotValid added in v1.0.2

func (p *Paths) IsNotValid() bool

func (*Paths) IsValid added in v1.0.2

func (p *Paths) IsValid() bool

func (*Paths) New

func (p *Paths) New(runtime *toolRuntime.TypeRuntime) *Paths

func (*Paths) SetBasePath added in v1.0.2

func (p *Paths) SetBasePath(s ...string) *ux.State

func (*Paths) SetContentPath added in v1.0.2

func (p *Paths) SetContentPath(s ...string) *ux.State

func (*Paths) SetCorePath added in v1.0.2

func (p *Paths) SetCorePath(s ...string) *ux.State

func (*Paths) SetRootPath added in v1.0.2

func (p *Paths) SetRootPath(s ...string) *ux.State

func (*Paths) SetVendorPath added in v1.0.2

func (p *Paths) SetVendorPath(s ...string) *ux.State

func (*Paths) SetWebRootPath added in v1.0.2

func (p *Paths) SetWebRootPath(s ...string) *ux.State

type Provider

type Provider struct {
	Name     string   `json:"name"`
	Meta     Meta     `json:"meta"`
	Defaults Defaults `json:"defaults"`

	Valid bool
	// contains filtered or unexported fields
}

func (*Provider) GetRepository

func (p *Provider) GetRepository() string

func (*Provider) GetWebroot

func (p *Provider) GetWebroot(addPrefix ...string) string

func (*Provider) IsNil

func (p *Provider) IsNil() *ux.State

func (*Provider) IsNotValid added in v1.0.2

func (p *Provider) IsNotValid() bool

func (*Provider) IsValid added in v1.0.2

func (p *Provider) IsValid() bool

func (*Provider) New

func (p *Provider) New(runtime *toolRuntime.TypeRuntime) *Provider

func (*Provider) Process

func (p *Provider) Process(runtime *toolRuntime.TypeRuntime) *ux.State

type Providers

type Providers []Provider
type Providers struct{
	providersArray

	Valid   bool
	runtime *toolRuntime.TypeRuntime
	state   *ux.State
}

type providersArray []Provider

func (*Providers) GetByName

func (ps *Providers) GetByName(provider string) *Provider

func (*Providers) GetBySiteId

func (ps *Providers) GetBySiteId(siteId string) *Provider

func (*Providers) IsNotValid added in v1.0.2

func (ps *Providers) IsNotValid() bool

func (*Providers) IsValid added in v1.0.2

func (ps *Providers) IsValid() bool

func (*Providers) New

func (ps *Providers) New(runtime *toolRuntime.TypeRuntime) *Providers

func (*Providers) Process

func (ps *Providers) Process(runtime *toolRuntime.TypeRuntime) *ux.State

type Repository

type Repository struct {
	Provider string `json:"provider"`
	URL      URL    `json:"url"`

	Valid bool
	// contains filtered or unexported fields
}

func (*Repository) GetProvider

func (r *Repository) GetProvider() string

func (*Repository) GetUrl

func (r *Repository) GetUrl() URL

func (*Repository) GetUrlAsDir added in v1.0.2

func (r *Repository) GetUrlAsDir() string

func (*Repository) IsGitProvider

func (r *Repository) IsGitProvider() bool

func (*Repository) IsNil

func (r *Repository) IsNil() *ux.State

func (*Repository) IsNotValid added in v1.0.2

func (r *Repository) IsNotValid() bool

func (*Repository) IsValid added in v1.0.2

func (r *Repository) IsValid() bool

func (*Repository) New

func (r *Repository) New(runtime *toolRuntime.TypeRuntime) *Repository

type Revision

type Revision struct {
	RefName string `json:"ref_name" mapstructure:"ref_name"`
	RefType string `json:"ref_type" mapstructure:"ref_type"`

	Valid bool
	// contains filtered or unexported fields
}

func (*Revision) GetName

func (r *Revision) GetName() string

func (*Revision) GetType

func (r *Revision) GetType() string

func (*Revision) IsNil

func (r *Revision) IsNil() *ux.State

func (*Revision) IsNotValid added in v1.0.2

func (r *Revision) IsNotValid() bool

func (*Revision) IsValid added in v1.0.2

func (r *Revision) IsValid() bool

func (*Revision) New

func (r *Revision) New(runtime *toolRuntime.TypeRuntime) *Revision

type Source

type Source struct {
	Build      Build      `json:"build"`
	Paths      Paths      `json:"paths"`
	Repository Repository `json:"repository"`
	Revision   Revision   `json:"revision"`

	AbsPaths Paths

	Valid bool
	// contains filtered or unexported fields
}

func (*Source) GetBuild

func (s *Source) GetBuild() bool

//////////////////////////////////////////////////////////////////////////////// Build

func (*Source) GetPaths

func (s *Source) GetPaths(abs ...interface{}) *Paths

//////////////////////////////////////////////////////////////////////////////// Paths

func (*Source) GetRepository

func (s *Source) GetRepository() *Repository

//////////////////////////////////////////////////////////////////////////////// Repository

func (*Source) GetRepositoryProvider

func (s *Source) GetRepositoryProvider() string

func (*Source) GetRepositoryUrl

func (s *Source) GetRepositoryUrl() URL

func (*Source) GetRevision

func (s *Source) GetRevision() *Revision

//////////////////////////////////////////////////////////////////////////////// Revision

func (*Source) GetRevisionName

func (s *Source) GetRevisionName() string

func (*Source) GetRevisionType

func (s *Source) GetRevisionType() string

func (*Source) IsNil

func (s *Source) IsNil() *ux.State

func (*Source) IsNotValid added in v1.0.2

func (s *Source) IsNotValid() bool

func (*Source) IsValid added in v1.0.2

func (s *Source) IsValid() bool

func (*Source) New

func (s *Source) New(runtime *toolRuntime.TypeRuntime) *Source

func (*Source) PrintRepo added in v1.0.2

func (s *Source) PrintRepo() string

func (*Source) Process

func (s *Source) Process() *ux.State

func (*Source) SetBasePath added in v1.0.2

func (s *Source) SetBasePath(path ...string) *ux.State

type State

type State ux.State

func (*State) Reflect

func (p *State) Reflect() *ux.State

type String

type String string

func (*String) ToString

func (s *String) ToString() string

type Target

type Target struct {
	AutoDeploy bool   `json:"auto_deploy" mapstructure:"auto_deploy"`
	HostName   string `json:"host_name" mapstructure:"host_name"`
	RefName    string `json:"ref_name" mapstructure:"ref_name"`

	Valid bool
	// contains filtered or unexported fields
}

func (*Target) IsNil

func (tr *Target) IsNil() *ux.State

func (*Target) IsNotValid added in v1.0.2

func (tr *Target) IsNotValid() bool

func (*Target) IsValid added in v1.0.2

func (tr *Target) IsValid() bool

func (*Target) New

func (tr *Target) New(runtime *toolRuntime.TypeRuntime) *Target

type Targets added in v1.0.2

type Targets []Target
type Targets struct{
	revisionsArray

	Valid   bool
	runtime *toolRuntime.TypeRuntime
	state   *ux.State
}

type revisionsArray []Target

func (*Targets) GetByHost added in v1.0.2

func (tr *Targets) GetByHost(host string) *Target

func (*Targets) GetByRefName added in v1.0.2

func (tr *Targets) GetByRefName(ref string) *Target

func (*Targets) IsNotValid added in v1.0.2

func (tr *Targets) IsNotValid() bool

func (*Targets) IsValid added in v1.0.2

func (tr *Targets) IsValid() bool

func (*Targets) New added in v1.0.2

func (tr *Targets) New(runtime *toolRuntime.TypeRuntime) *Targets

func (*Targets) Process added in v1.0.2

func (tr *Targets) Process(runtime *toolRuntime.TypeRuntime) *ux.State

type ToolDeployWp added in v1.0.2

type ToolDeployWp TypeDeployWp

func (*ToolDeployWp) IsNil added in v1.0.2

func (dwp *ToolDeployWp) IsNil() *ux.State

func (*ToolDeployWp) Reflect added in v1.0.2

func (dwp *ToolDeployWp) Reflect() *TypeDeployWp

type TypeDeployWp

type TypeDeployWp struct {
	Hosts       Hosts       `json:"hosts"` // mapstructure:",squash"`
	Source      Source      `json:"source"`
	Destination Destination `json:"destination"`

	Print   UxPrint
	Valid   bool
	Runtime *toolRuntime.TypeRuntime
	State   *ux.State
}

func ReflectDeployWp

func ReflectDeployWp(ref interface{}) *TypeDeployWp

func ToolLoadDeployWp added in v1.0.2

func ToolLoadDeployWp(str interface{}, args []string) *TypeDeployWp

func (*TypeDeployWp) Build added in v1.0.2

func (dwp *TypeDeployWp) Build() *ux.State

This is an alternative to running templates. In theory, the code here, should be able to be replicated in a template file without modification.

func (*TypeDeployWp) CheckoutRepo

func (dwp *TypeDeployWp) CheckoutRepo(gitRef *toolGit.TypeGit, versionType string, version string) *ux.State

func (*TypeDeployWp) CleanRepo

func (dwp *TypeDeployWp) CleanRepo(gitRef *toolGit.TypeGit, force bool) *ux.State

Part 5 - see docs.go

func (*TypeDeployWp) CloneRepo added in v1.0.2

func (dwp *TypeDeployWp) CloneRepo(url string, pathRef *toolPath.TypeOsPath) *toolGit.TypeGit

func (*TypeDeployWp) CopyFile

func (dwp *TypeDeployWp) CopyFile(src string, dst string) *ux.State

func (*TypeDeployWp) CopyFiles

func (dwp *TypeDeployWp) CopyFiles(src string, dst string, exclude ...string) *ux.State

Part 6 - see docs.go

func (*TypeDeployWp) ExitOnError

func (dwp *TypeDeployWp) ExitOnError() string

func (*TypeDeployWp) ExitOnWarning

func (dwp *TypeDeployWp) ExitOnWarning() string

func (*TypeDeployWp) GetDestination added in v1.0.2

func (dwp *TypeDeployWp) GetDestination() *Destination

//////////////////////////////////////////////////////////////////////////////// Destination

func (*TypeDeployWp) GetDestinationAbsPaths added in v1.0.2

func (dwp *TypeDeployWp) GetDestinationAbsPaths() *Paths

func (*TypeDeployWp) GetDestinationFiles added in v1.0.2

func (dwp *TypeDeployWp) GetDestinationFiles(ftype string) *FilesArray

//////////////////////////////////////////////////////////////////////////////// Destination.Files

func (*TypeDeployWp) GetDestinationPaths added in v1.0.2

func (dwp *TypeDeployWp) GetDestinationPaths() *Paths

//////////////////////////////////////////////////////////////////////////////// Destination.Paths

func (*TypeDeployWp) GetDestinationProvider added in v1.0.2

func (dwp *TypeDeployWp) GetDestinationProvider(provider string) *Provider

//////////////////////////////////////////////////////////////////////////////// Destination.Providers

func (*TypeDeployWp) GetDestinationRevision added in v1.0.2

func (dwp *TypeDeployWp) GetDestinationRevision(host string) *Target

//////////////////////////////////////////////////////////////////////////////// Destination.Revisions

func (*TypeDeployWp) GetHost added in v1.0.2

func (dwp *TypeDeployWp) GetHost() string

func (*TypeDeployWp) GetHostByName

func (dwp *TypeDeployWp) GetHostByName(host string) *Host

func (*TypeDeployWp) GetHostByProvider

func (dwp *TypeDeployWp) GetHostByProvider(provider string) *Host

func (*TypeDeployWp) GetHosts

func (dwp *TypeDeployWp) GetHosts() *Hosts

//////////////////////////////////////////////////////////////////////////////// Hosts

func (*TypeDeployWp) GetSource

func (dwp *TypeDeployWp) GetSource() *Source

//////////////////////////////////////////////////////////////////////////////// Source

func (*TypeDeployWp) GetSourceAbsPaths

func (dwp *TypeDeployWp) GetSourceAbsPaths() *Paths

func (*TypeDeployWp) GetSourceBuild

func (dwp *TypeDeployWp) GetSourceBuild() bool

//////////////////////////////////////////////////////////////////////////////// Source.Build

func (*TypeDeployWp) GetSourcePaths

func (dwp *TypeDeployWp) GetSourcePaths() *Paths

//////////////////////////////////////////////////////////////////////////////// Source.Paths

func (*TypeDeployWp) GetSourceRepositoryProvider

func (dwp *TypeDeployWp) GetSourceRepositoryProvider() string

//////////////////////////////////////////////////////////////////////////////// Source.Repository

func (*TypeDeployWp) GetSourceRepositoryUrl

func (dwp *TypeDeployWp) GetSourceRepositoryUrl() URL

func (*TypeDeployWp) GetSourceRevisionName

func (dwp *TypeDeployWp) GetSourceRevisionName() string

func (*TypeDeployWp) GetSourceRevisionType

func (dwp *TypeDeployWp) GetSourceRevisionType() string

//////////////////////////////////////////////////////////////////////////////// Source.Revision

func (*TypeDeployWp) IsNil

func (dwp *TypeDeployWp) IsNil() *ux.State

func (*TypeDeployWp) IsNotValid added in v1.0.2

func (dwp *TypeDeployWp) IsNotValid() bool

func (*TypeDeployWp) IsValid added in v1.0.2

func (dwp *TypeDeployWp) IsValid() bool

func (*TypeDeployWp) New

func (dwp *TypeDeployWp) New(runtime *toolRuntime.TypeRuntime) *TypeDeployWp

func (*TypeDeployWp) OpenDestinationRepo added in v1.0.2

func (dwp *TypeDeployWp) OpenDestinationRepo() *toolGit.TypeGit

func (*TypeDeployWp) OpenRepo

func (dwp *TypeDeployWp) OpenRepo(url string, pathRef *toolPath.TypeOsPath) *toolGit.TypeGit

Part 2 - see docs.go Part 4 - see docs.go

func (*TypeDeployWp) OpenSourceRepo

func (dwp *TypeDeployWp) OpenSourceRepo() *toolGit.TypeGit

func (*TypeDeployWp) PrintDestinationPaths added in v1.0.2

func (dwp *TypeDeployWp) PrintDestinationPaths() *ux.State

func (*TypeDeployWp) PrintRepo added in v1.0.2

func (dwp *TypeDeployWp) PrintRepo(gitRef *toolGit.TypeGit) *ux.State

func (*TypeDeployWp) PrintSourcePaths added in v1.0.2

func (dwp *TypeDeployWp) PrintSourcePaths() *ux.State

func (*TypeDeployWp) Reflect

func (dwp *TypeDeployWp) Reflect() *ToolDeployWp

func (*TypeDeployWp) RunComposer

func (dwp *TypeDeployWp) RunComposer(dstDir string, args ...string) *ux.State

7. Run composer, (within /tmp/deploywp/destination/).

  • Fixup composer.json

  • .extra.wordpress-webroot-path = {{ .destination.paths.wordpress.root_path }}

  • .extra.wordpress-core-path = {{ .destination.paths.wordpress.core_path }}

  • .extra.wordpress-content-path = {{ .destination.paths.wordpress.content_path }}

  • .config.vendor-dir = {{ .destination.paths.webroot_path }}/{{ .destination.paths.wordpress.vendor_path }}

  • .extra.installer-paths.*

  • ReplacePrefix -> destination references

  • {{ .destination.paths.webroot_path }}/{{ .destination.paths.wordpress.core_path }}/

  • {{ .destination.paths.webroot_path }}/{{ .destination.paths.wordpress.content_path }}/

  • {{ .destination.paths.webroot_path }}/{{ .destination.paths.wordpress.vendor_path }}/

  • {{ .destination.paths.webroot_path }}/{{ .destination.paths.wordpress.root_path }}/

  • Check Mike's BASH script.

  • composer install

  • find /tmp/deploywp/destination/ -name composer.json -delete

func (*TypeDeployWp) SelectDestinationHost added in v1.0.2

func (dwp *TypeDeployWp) SelectDestinationHost() *ux.State

func (*TypeDeployWp) TestNewUxState added in v1.0.2

func (dwp *TypeDeployWp) TestNewUxState() *ux.State

func (*TypeDeployWp) UpdateDestination added in v1.0.2

func (dwp *TypeDeployWp) UpdateDestination(srcPath *Paths, dstPath *Paths) *ux.State

type URL

type URL string

func (*URL) GetAsDir added in v1.0.2

func (u *URL) GetAsDir() string

func (*URL) IsNotValid added in v1.0.2

func (u *URL) IsNotValid() bool

func (*URL) IsValid added in v1.0.2

func (u *URL) IsValid() bool

func (*URL) String

func (u *URL) String() string

type UxPrint added in v1.0.2

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

func (*UxPrint) Append added in v1.0.2

func (up *UxPrint) Append(format string, args ...interface{})

func (*UxPrint) Error added in v1.0.2

func (up *UxPrint) Error(indent int, format string, args ...interface{})

func (*UxPrint) Intent added in v1.0.2

func (up *UxPrint) Intent(format string, args ...interface{})

func (*UxPrint) IntentAppend added in v1.0.2

func (up *UxPrint) IntentAppend(format string, args ...interface{})

func (*UxPrint) IntentResponse added in v1.0.2

func (up *UxPrint) IntentResponse(state *ux.State)

func (*UxPrint) Notify added in v1.0.2

func (up *UxPrint) Notify(indent int, format string, args ...interface{})

func (*UxPrint) Ok added in v1.0.2

func (up *UxPrint) Ok(indent int, format string, args ...interface{})

func (*UxPrint) PrintResponse added in v1.0.2

func (up *UxPrint) PrintResponse(state *ux.State)

func (*UxPrint) Warning added in v1.0.2

func (up *UxPrint) Warning(indent int, format string, args ...interface{})

type Wordpress

type Wordpress struct {
	ContentPath string `json:"content_path" mapstructure:"content_path"`
	CorePath    string `json:"core_path" mapstructure:"core_path"`
	RootPath    string `json:"root_path" mapstructure:"root_path"`
	VendorPath  string `json:"vendor_path" mapstructure:"vendor_path"`

	Valid bool
	// contains filtered or unexported fields
}

func (*Wordpress) IsNil

func (wp *Wordpress) IsNil() *ux.State

func (*Wordpress) IsNotValid added in v1.0.2

func (wp *Wordpress) IsNotValid() bool

func (*Wordpress) IsValid added in v1.0.2

func (wp *Wordpress) IsValid() bool

func (*Wordpress) New

func (wp *Wordpress) New(runtime *toolRuntime.TypeRuntime) *Wordpress

Jump to

Keyboard shortcuts

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