@@ -107,6 +107,7 @@ type upstream struct {
107107 tarPath string // path to the downloaded or generated orig tarball tempfile
108108 compression string // compression method, either "gz" or "xz"
109109 version string // Debian package upstream version number, e.g. 0.0~git20180204.1d24609
110+ tag string // Latest upstream tag, if any
110111 commitIsh string // commit-ish corresponding to upstream version to be packaged
111112 remote string // git remote, set to short hostname if upstream git history is included
112113 firstMain string // import path of the first main package within repo, if any
@@ -144,16 +145,16 @@ func (u *upstream) tarballFromHoster() error {
144145
145146 switch repoU .Host {
146147 case "github.com" :
147- tarURL = fmt .Sprintf ("%s/archive/v %s.tar.%s" ,
148- repo , u .version , u .compression )
148+ tarURL = fmt .Sprintf ("%s/archive/%s.tar.%s" ,
149+ repo , u .tag , u .compression )
149150 case "gitlab.com" :
150151 parts := strings .Split (repoU .Path , "/" )
151152 if len (parts ) < 3 {
152153 return fmt .Errorf ("Incomplete repo URL: %s" , u .rr .Repo )
153154 }
154155 project := parts [2 ]
155- tarURL = fmt .Sprintf ("%s/-/archive/v%[3] s/%[2] s-%s.tar.%s" ,
156- repo , project , u .version , u .compression )
156+ tarURL = fmt .Sprintf ("%s/-/archive/% s/%s-%s.tar.%s" ,
157+ repo , u . tag , project , u .tag , u .compression )
157158 default :
158159 return fmt .Errorf ("Unsupported hoster" )
159160 }
0 commit comments