steps

package
v0.0.0-...-078a86d Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateToRepository

func AuthenticateToRepository(repository *git.GitRepository, gitToken string)

AuthenticateToRepository authenticates to the repository if a token is provided.

func CalculatePath

func CalculatePath(path string, defaultName string) (string, error)

CalculatePath calculates the absolute path for a given relative or absolute path string. If the path is already absolute, it is returned as-is. If the path is empty, the defaultName is appended to the current working directory. Otherwise, the path is appended to the current working directory.

func CloneRepository

func CloneRepository(repository *git.GitRepository, clonePath string) error

CloneRepository clones the repository.

func CreateAndValidateRepository

func CreateAndValidateRepository(repositoryURL, branch, tag string) (*git.GitRepository, error)

CreateAndValidateRepository creates the Git repository instance and validates it.

func DeleteIgnoredPaths

func DeleteIgnoredPaths(directory string, ignorePaths []string)

DeleteIgnoredPaths removes files and directories from the specified 'directory' if their paths match any of the patterns listed in 'cloneyMetadata.Configuration.IgnorePaths'. It iterates through the ignore paths and deletes them recursively.

Parameters:

  • cloneyMetadata: The metadata containing the configuration of the template repository.
  • directory: The base directory from which to start removing files and directories.

func FillDirectory

func FillDirectory(
	src string,
	ignorePaths []string,
	outputInTerminal bool,
	variablesMap map[string]interface{}) error

FillDirectory fills template variables in files within the source directory.

func GetCurrentWorkingDirectory

func GetCurrentWorkingDirectory() (string, error)

GetCurrentWorkingDirectory returns the current working directory.

func GetUserVariablesMap

func GetUserVariablesMap(currentDir, variables string) (map[string]interface{}, error)

GetUserVariablesMap returns the template variables provided by the user.

func MatchUserVariables

func MatchUserVariables(cloneyMetadata *metadata.CloneyMetadata, variablesMap map[string]interface{}) error

MatchUserVariables matches the user variables with the template variables.

func ParseRepositoryMetadata

func ParseRepositoryMetadata(metadataContent string, supportedManifestVersions []string) (*metadata.CloneyMetadata, error)

ParseRepositoryMetadata parses the repository metadata.

func ReadRepositoryMetadata

func ReadRepositoryMetadata(metadataFilePath string) (string, error)

ReadRepositoryMetadata reads the repository metadata.

func SetSuppressPrints

func SetSuppressPrints(value bool)

SetSuppressPrints sets the suppressPrints flag.

Types

This section is empty.

Jump to

Keyboard shortcuts

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