carvel-dev / carvel-dev/vendir

Empower vendir to make an informed decision on what the overall semver of a directory is

Open
#165 14 comments 1 reaction 1 assignee Claimed by @kumaritanushree View on GitHub
carvel-accepted enhancement
Dominant language
Go
Stars
399
Forks
73
Avg merge
2h 53m
Merged PRs (30d)
2

Description

**Describe the problem/challenge you have**
After I sync things with vendir and create my informed view of a folder I need to make a decision later on about what overall semantically appropriate version this folder is. Today I do that with some `yq` glue:

```
if [ -f "${PWD}/version-override.yml" ]; then
APP_VERSION=$(yq eval '.. | select(has("tag")).tag' version-override.yml)
else
APP_VERSION=$(yq eval '.. | select(has("tag")).tag, .. | select(has("tags")).tags[0]' vendir.yml vendir.lock.yml | head -n1)
fi
```

This is later surfaced with the Carvel Packaging API, since it requires semver to properly function.

**Describe the solution you'd like**
I later on need to populate a Package CR and it needs a semver passed into it. If vendir had some sort of command, like `vendir lock-config-tag -d dir/sub-dir` that could spit out something properly formatted for the Packaging API, I would be happy.

**Anything else you would like to add:**
I'm not sure what to do as a failover, or what happens when vendir can't ascertain what the versioning is if nothing in the folder itself is semver.

---
Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.