source-tag attempts to clone branch, fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Attempting to build a tagged revision from a git repo fails, as snapcraft treats the tag as a branch and the clone fails attempting to clone a branch that does not exist. The exact same error is seen using source-branch, which indicates snapcraft is treating source-tag and source-branch as interchangable where in this particular case they are not.
While you are there, git clone is very likely to fail so catching the CalledProcessError and printing an error more readable than a traceback would be a usability win.
name: schemaspy
version: 6.0.0-rc2
summary: SchemaSpy database documentation generation
description: >
SchemaSpy is a tool that analyzes the metadata of a schema in a database
and generates a visual representation of it in a browser-displayable
format. It lets you click through the hierarchy of database tables
via child and parent table relationships as represented by both HTML
links and entity-relationship diagrams. It’s also designed to help
resolve the obtuse errors that a database sometimes gives related to
failures due to constraints. It is free software that is distributed
under the terms of the MIT License.
grade: stable
confinement: strict
apps:
schemaspy:
command: schemaspy
plugs:
- network
parts:
schemaspy:
plugin: maven
source: https:/
source-type: git
source-tag: 6.0.0-rc2
Fails with:
Pulling schemaspy
Cloning into '/home/
fatal: Remote branch 6.0.0-rc2 not found in upstream origin
Traceback (most recent call last):
File "/usr/bin/
load_
File "/usr/lib/
return get_distributio
File "/usr/lib/
return ep.load()
File "/usr/lib/
return self.resolve()
File "/usr/lib/
module = __import_
File "/usr/lib/
run(
File "/usr/lib/
return self.main(*args, **kwargs)
File "/usr/lib/
rv = self.invoke(ctx)
File "/usr/lib/
return Command.
File "/usr/lib/
return ctx.invoke(
File "/usr/lib/
return callback(*args, **kwargs)
File "/usr/lib/
return f(get_current_
File "/usr/lib/
ctx.
File "/usr/lib/
return self.invoke(cmd, **kwargs)
File "/usr/lib/
return callback(*args, **kwargs)
File "/usr/lib/
project_
File "/usr/lib/
execute(
File "/usr/lib/
_Executor(
File "/usr/lib/
self.
File "/usr/lib/
getattr(part, step)()
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
**self.
File "/usr/lib/
raise CalledProcessEr
subprocess.
I am using git 2.14.2 (latest stable), which may be an issue.