installupdate

package
v2.107.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GodelPropsDistPkgInfo

func GodelPropsDistPkgInfo(projectDir string) (godelgetter.PkgSrc, error)

GodelPropsDistPkgInfo returns a package that consists of the distribution URL and checksum (if it exists) from the gödel configuration file for the gödel installation in the provided project directory.

func InstallVersion

func InstallVersion(projectDir, targetVersion, wantChecksum string, cacheValidDuration time.Duration, newInstall bool, stdout io.Writer) error

InstallVersion installs the specified version of gödel in the provided project directory. If targetVersion is the empty string, the latest version is determined and used.

func NewInstall

func NewInstall(dstDirPath string, srcPkg godelgetter.PkgSrc, stdout io.Writer) error

NewInstall performs a new installation of gödel in the specified directory using the specified package as the source. Calls "Install" to install the package provided as a parameter. Once the package is installed, the wrapper and settings files are copied from the newly downloaded distribution to the specified path. If there was a previous installation of gödel in the path, it is overwritten by the new file. However, changes in the "var" directory are purely additive -- files that have been added in this directory in the new distribution will be added, but existing files will not be modified or removed.

func RunActionAndUpgradeConfig

func RunActionAndUpgradeConfig(projectDir string, skipUpgradeConfig bool, action func() error, stdout, stderr io.Writer) error

RunActionAndUpgradeConfig determines the gödel version of the project before the action, performs the action, determines the version after the action and runs the "upgrade-config" task depending on the version before and after the action.

If the major version after the action is <2, then no action is performed (version 2 is the first version that supports configuration upgrades).

If the major version after the action is >=2 and the major version before the action was <2, then "upgrade-config" is called with the "--legacy" flag set.

If the major version before and after the action are both >=2, then the "upgrade-config" task is run if the version after the action is >= the version before the action.

If the skipUpgradeConfig variable is true, then the provided action is run without any extra work.

func RunUpgradeConfig

func RunUpgradeConfig(projectDir string, stdout, stderr io.Writer) error

RunUpgradeConfig runs the "upgrade-config" task by invoking "{{projectDir}}/godelw upgrade-config".

func RunUpgradeLegacyConfig

func RunUpgradeLegacyConfig(projectDir string, stdout, stderr io.Writer) error

RunUpgradeLegacyConfig runs the "upgrade-config" task in legacy mode by invoking "{{projectDir}}/godelw upgrade-config --legacy".

func Update

func Update(projectDirPath string, srcPkg godelgetter.PkgSrc, stdout io.Writer) error

Update updates the gödel installation in the specified directory to be the distribution specified by the provided package source. Once the package is installed, the existing wrapper script and its directory are overwritten with the files provided by the package that was downloaded. However, changes in the "godel" directory are purely additive -- files that have been added in this directory in the new distribution will be added, but existing files will not be modified or removed.

Types

type Type

type Type int
const (
	ReleaseCandidate Type = iota
	ReleaseCandidateSnapshot
	Release
	ReleaseSnapshot
	NonOrderable
)

func (Type) String

func (t Type) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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