| 26 | } |
| 27 | |
| 28 | func parseManifestSourceSpec(source string) (*RepoSpec, bool, error) { |
| 29 | repoSpec, ok, err := parseRepositoryPackageSpec(strings.TrimSpace(source)) |
| 30 | if !ok { |
| 31 | return nil, false, nil |
| 32 | } |
| 33 | if err != nil { |
| 34 | return nil, true, fmt.Errorf("invalid manifest source %q: %w", source, err) |
| 35 | } |
| 36 | if repoSpec == nil { |
| 37 | return nil, false, nil |
| 38 | } |
| 39 | return repoSpec, true, nil |
| 40 | } |
| 41 | |
| 42 | func manifestSourceWithRef(repoSpec *RepoSpec, ref string) string { |
| 43 | base := repositoryPackageIdentifier(repoSpec.RepoSlug, repoSpec.PackagePath) |