// osVersionAndBuild returns OS version, and build too on some platforms
967159
func (c *CmdStatus) osVersionAndBuild() (string, string, error) {
	productVersion, err := c.execToString("cmd", []string{"/c", "ver"})
	if err != nil {
		return "", "", err
	}

	return productVersion, "", nil
}
952459
func (h *binaryInstantiateHandler) cancelBuild(build *buildapi.Build) {
	var versionedBuild = &buildv1.Build{}
	if err := legacyscheme.Scheme.Convert(build, versionedBuild, nil); err != nil {
		klog.Errorf("Unable to convert build to versioned build: %v", err)
		return
	}
	versionedBuild.Status.Cancelled = true
	h.r.Generator.Client.UpdateBuild(h.ctx, versionedBuild)
	wait.Poll(cancelPollInterval, cancelPollDuration, func() (bool, error) {
		versionedBuild.Status.Cancelled = true
		err := h.r.Generator.Client.UpdateBuild(h.ctx, versionedBuild)
		switch {
		case err != nil && errors.IsConflict(err):
			versionedBuild, err = h.r.Generator.Client.GetBuild(h.ctx, versionedBuild.Name, &metav1.GetOptions{})
			return false, err
		default:
			return true, err
		}
	})
}
674890
func buildVersionRange(opStr, vStr string) (*versionRange, error) {
	c := parseComparator(opStr)
	if c == nil {
		return nil, fmt.Errorf("Could not parse comparator %q in %q", opStr, strings.Join([]string{opStr, vStr}, ""))
	}
	v, err := Parse(vStr)
	if err != nil {
		return nil, fmt.Errorf("Could not parse version %q in %q: %s", vStr, strings.Join([]string{opStr, vStr}, ""), err)
	}

	return &versionRange{
		v: v,
		c: c,
	}, nil

}
277133
func Convert_build_BuildStatus_To_v1_BuildStatus(in *build.BuildStatus, out *v1.BuildStatus, s conversion.Scope) error {
	return autoConvert_build_BuildStatus_To_v1_BuildStatus(in, out, s)
}
1247894
func (s *InstanceInformation) SetPlatformVersion(v string) *InstanceInformation {
	s.PlatformVersion = &v
	return s
}
302431
func Convert_v1_Build_To_build_Build(in *v1.Build, out *build.Build, s conversion.Scope) error {
	return autoConvert_v1_Build_To_build_Build(in, out, s)
}
591776
func Convert_v1_BuildStatus_To_build_BuildStatus(in *v1.BuildStatus, out *build.BuildStatus, s conversion.Scope) error {
	return autoConvert_v1_BuildStatus_To_build_BuildStatus(in, out, s)
}
58166
func Version() string {
	// Start with the major, minor, and patch versions.
	version := fmt.Sprintf("%d.%d.%d", appMajor, appMinor, appPatch)

	// Append pre-release version if there is one.  The hyphen called for
	// by the semantic versioning spec is automatically appended and should
	// not be contained in the pre-release string.  The pre-release version
	// is not appended if it contains invalid characters.
	preRelease := normalizeVerString(appPreRelease)
	if preRelease != "" {
		version = fmt.Sprintf("%s-%s", version, preRelease)
	}

	// Append commit hash of current build to version.
	version = fmt.Sprintf("%s commit=%s", version, Commit)

	return version
}
32934
func (s *EcsParameters) SetPlatformVersion(v string) *EcsParameters {
	s.PlatformVersion = &v
	return s
}
1158163
func NewBuildVersion(s string) (string, error) {
	if len(s) == 0 {
		return "", errors.New("Buildversion is empty")
	}
	if !containsOnly(s, alphanum) {
		return "", fmt.Errorf("Invalid character(s) found in build meta data %q", s)
	}
	return s, nil
}
586079
func (i *ProviderInstaller) findPlatformCompatibleVersion(versions []*response.TerraformProviderVersion) (*response.TerraformProviderVersion, error) {
	for _, version := range versions {
		if err := i.checkPlatformCompatibility(version); err == nil {
			return version, nil
		}
	}

	return nil, ErrorNoVersionCompatibleWithPlatform
}
769510
func (s *Service) addBuildVersion(w http.ResponseWriter) {
	// Add version header to every response, if available.
	version := "unknown"
	if v, ok := s.BuildInfo["version"].(string); ok {
		version = v
	}
	w.Header().Add(VersionHTTPHeader, version)
}
884033
func (v VersionsFile) AddVersion(pkg, ver, iid string) error {
	if err := common.ValidatePackageName(pkg); err != nil {
		return err
	}
	if err := common.ValidateInstanceVersion(ver); err != nil {
		return err
	}
	if err := common.ValidateInstanceID(iid, common.AnyHash); err != nil {
		return err
	}

	if common.ValidateInstanceID(ver, common.AnyHash) == nil {
		if ver != iid {
			return errors.Reason(
				"version given as instance ID (%q) should resolve into that ID, not into %q",
				ver, iid).Err()
		}
		return nil
	}

	v[unresolvedVer{pkg, ver}] = iid
	return nil
}
1345151
func (s *Build) SetSourceVersion(v string) *Build {
	s.SourceVersion = &v
	return s
}
79761
func StatusReleaseVersion(version int32) StatusOption {
	return func(opts *options) {
		opts.statusReq.Version = version
	}
}
242206
func (s *TaskSet) SetPlatformVersion(v string) *TaskSet {
	s.PlatformVersion = &v
	return s
}
341008
func BuildNameForConfigVersion(name string, version int) string {
	return fmt.Sprintf("%s-%d", name, version)
}