"version: git" can produce version strings too long for snapd

Bug #1812633 reported by Daniel Holbach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

The following snapcraft.yaml (to go into the github.com/weaveworks/flux tree):

name: fluxctl
version: git
summary: fluxctl talks to Weave Flux and helps you deploy your code
description: |
  fluxctl talks to your Weave Flux instance and exposes all its
  functionality to an easy to use command line interface.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict
plugs:
  system-files:
    read: [/etc/kube/config]
  personal-files:
    read:
      - $HOME/.kube/config
      - $HOME/.minikube/client.key
      - $HOME/.minikube/client.crt
      - $HOME/.minikube/ca.crt

parts:
  fluxctl:
    plugin: go
    go-importpath: github.com/weaveworks/flux
    prime:
      - bin/fluxctl

apps:
  fluxctl:
    command: fluxctl
    plugs: [system-files, personal-files, network, network-bind]

snapd gives:

[daniel@reef flux ]$ snap install --dangerous fluxctl_chart-0.2.1+git664.3a0e5b88-dirty_amd64.snap
Fehler: cannot read snap file: invalid snap version "chart-0.2.1+git664.3a0e5b88-dirty": cannot be
        longer than 32 characters (got: 33)
[daniel@reef flux ]$

Revision history for this message
Guilhem Lettron (guilhem-fr) wrote :

You may use `version-script:` to forge your own command line.
Maybe default options of `git describe` aren't good for your project.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Super, thanks for the tip.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.