ctpm

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package ctpm manages the action of the various CLI commands.

Index

Constants

This section is empty.

Variables

View Source
var InitDefaultOptions = InitOptions{
	NoTemplate: false,
}

Functions

func Add

func Add(pc *config.ProjectConfig, opts AddOptions) error

func AddDependenciesAndBuild added in v0.1.0

func AddDependenciesAndBuild(pc *config.ProjectConfig) error

func Build

func Build(pc *config.ProjectConfig) error

func Init

func Init(pc *config.ProjectConfig, opt InitOptions) error

func Install

func Install(name string, version *semver.Version) error

Install fetches the package, unpacks it in the c3pm cache and builds it. If the lib already is in the cache, we don't do anything

func Login

func Login(client api.API, login, password string) error

func Logout

func Logout() error

func Publish

func Publish(pc *config.ProjectConfig, client api.API) error

Publish function makes an array of the files to include in the tarball based on the Include and Exclude fields of the c3pm.yaml The array is then given to the Upload function in the client We enforce the exclusion of the .git and .c3pm directories and we enforce the inclusion of the c3pm.yml file

func Remove added in v0.1.0

func Remove(pc *config.ProjectConfig, opts RemoveOptions) error

Types

type AddOptions

type AddOptions struct {
	Force       bool
	RegistryURL string

	Dependencies []string
}

type InitOptions

type InitOptions struct {
	NoTemplate bool
}

type RemoveOptions added in v0.1.0

type RemoveOptions struct {
	Dependencies []string
}

Jump to

Keyboard shortcuts

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