Example #1
0
// Get runs the get_version script.
func Get() (*Version, error) {
	// Run the get_version script.
	stdout, err := scripts.Run(scripts.ScriptNameGetVersion)
	if err != nil {
		return nil, err
	}

	// Parse the output and return the version.
	return Parse(strings.TrimSpace(stdout.String()))
}
Example #2
0
// Set runs the set_version script.
func Set(ver *Version) error {
	// Run the set_version script.
	_, err := scripts.Run(scripts.ScriptNameSetVersion, ver.String())
	return err
}