Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature-request: craftctl set description #5123

Open
rebornplusplus opened this issue Oct 16, 2024 · 1 comment
Open

feature-request: craftctl set description #5123

rebornplusplus opened this issue Oct 16, 2024 · 1 comment

Comments

@rebornplusplus
Copy link
Member

What needs to get done

It would be nice to have the ability to set description using craftctl. Per docs, setting only version and grade is supported currently.

Why it needs to get done

If your snap ships with only a specific binary, you can use one of the binary's help output to dynamically reflect in the description. Instead of changing the snapcraft.yaml everytime the help output changes, we can use this feature.

For example, for the chisel snap, we could utilise something like below:

parts:
  metadata:
    override-build: |
      # set snap description
      description="$(${CRAFT_STAGE}/bin/chisel help --all)"
      header="foo"
      footer="bar"
      printf -v description "$header\n\n$description\n\n$footer" 
      craftctl set description="$description"
@mr-cal
Copy link
Collaborator

mr-cal commented Nov 7, 2024

Hi @rebornplusplus,

This is a good suggestion but we are hesistant to add support for this for a few reasons.

  • We think it may be too niche as most application descriptions don't change often. We considered if this would be useful for getting a description out of a repo's README, but the parsing and potential for breaking the description if the README changes outweighs the convience of this.
  • We're not convinced a command-line help output should be in a snap's description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants