Documentation ¶
Index ¶
- Constants
- func GetProjectName(log *logging.Logger, projectDir string) (string, error)
- func GetProjectOrganizationName(log *logging.Logger, projectDir string) (string, error)
- func GetProjectOrganizationPath(log *logging.Logger, projectDir string) (string, error)
- func GetProjectSiblingURL(log *logging.Logger, projectDir, siblingName string) (string, error)
- func ReadVersion(projectDir string) (string, error)
- type GithubAsset
- type ProjectSettings
Constants ¶
View Source
const ( InitialVersion = "0.0.0+git" VersionFile = "VERSION" )
Variables ¶
This section is empty.
Functions ¶
func GetProjectName ¶
Try to read project name
func GetProjectOrganizationName ¶
Try to read project's organization name (e.g. 'pulcy')
func GetProjectOrganizationPath ¶
Try to read project's organization path (e.g. 'github.com/pulcy')
func GetProjectSiblingURL ¶
Try to return the URL of a project's sibling project (e.g. 'git@github.com:pulcy/sibling.git')
Types ¶
type GithubAsset ¶
type ProjectSettings ¶
type ProjectSettings struct { Image string `json:"image"` // Docker image name Registry string `json:"registry"` // Docker registry prefix Namespace string `json:"namespace"` // Docker namespace prefix NoGrunt bool `json:"no-grunt"` // If set, grunt won't be called even if there is a Gruntfile.js TagLatest bool `json:"tag-latest"` // If set, a latest tag will be set of the docker image TagMajorVersion bool `json:"tag-major-version"` // If set, a tag will be set to the major version of the docker image (e.g. myimage:3) TagMinorVersion bool `json:"tag-minor-version"` // If set, a tag will be set to the minor version of the docker image (e.g. myimage:3.2) GitBranch string `json:"git-branch,omitempty"` // If set, this branch is expected (defaults to master) Targets struct { CleanTarget string `json:"clean,omitempty"` ReleaseTarget string `json:"release,omitempty"` } `json:"targets"` ManifestFiles []string `json:"manifest-files"` // Additional manifest files GoVendorDir string `json:"go-vendor-dir"` // If set, use this instead of `./vendor` as vendor directory. GradleConfigFile string `json:"gradle-config-file"` // If set, creates a file with this path containing the current version GithubAssets []GithubAsset `json:"github-assets"` // If set, creates a github release with given assets. }
func Read ¶
func Read(dir string) (*ProjectSettings, error)
Read tries to read .pulcy settings file. If found the unmarshaled settings are returned, if not found nil is returned.
Click to show internal directories.
Click to hide internal directories.