<div dir="ltr">Thanks for the feedback.<div><br></div><div>The problem with the repository at hand is that it’s using a light-weight tag instead of an annotated tag:</div><div><br></div><div><div>$ cat .git/packed-refs </div><div># pack-refs with: peeled fully-peeled </div><div>c7477ad8e330bef55bf1ebe300cf8aa67c492d1b refs/remotes/origin/master</div><div>46a638d98be2af4fa6de146b5d28a9d9904a3949 refs/tags/v0.1</div><div><br></div><div>$ git cat-file -t 46a638d98be2af4fa6de146b5d28a9d9904a3949</div><div>commit</div></div><div><br></div><div>The type of the tag should be â€œtag”, not â€œcommit”, for an annotated tag. Otherwise git-describe will not consider the tag. From git-tag(1):</div><div><br></div><div>  Â  Annotated tags are meant for release while lightweight tags are meant for private or temporary object labels. For this reason, some git commands for naming objects (like git describe) will ignore lightweight tags by default.</div><div><br></div><div>See also <a href="https://stackoverflow.com/questions/11514075/what-is-the-difference-between-an-annotated-and-unannotated-tag">https://stackoverflow.com/questions/11514075/what-is-the-difference-between-an-annotated-and-unannotated-tag</a></div><div><br></div><div>I think you should file a bug upstream and ask them to create annotated tags for this release and in the future. Then, merely using --git_revision=v0.1 should work with dh-make-golang.</div><div><br></div><div>I suppose we should add some logic to detect this problem and emit a warning message in dh-make-golang. Could you file an issue for that at <a href="https://github.com/Debian/dh-make-golang">https://github.com/Debian/dh-make-golang</a> please?</div><div><br></div><div>If anyone else has a different idea, I’m all ears :).</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 4, 2015 at 8:28 AM, Potter, Tim (Converged Cloud) <span dir="ltr"><<a href="mailto:timothy.potter@hpe.com" target="_blank">timothy.potter@hpe.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Michael.  I’ve been using dh-make-golang a lot recently (thanks - it’s awesome!) but had a<br>
question about the -git_revision option.<br>
<br>
If I specify refs/tags/v0.1 then the package version is set to the git hash version string used<br>
when creating master snapshot packages.<br>
<br>
Would it be better to have a -version option to be able to set the package version number<br>
when using -git_revision?<br>
<br>
For example:<br>
<br>
root@b563bbeedb84:/# dh-make-golang -git_revision=refs/tags/v0.1 <a href="http://github.com/codegangsta/negroni">github.com/codegangsta/negroni</a><br>
2015/11/04 18:25:09 Downloading "<a href="http://github.com/codegangsta/negroni/..">github.com/codegangsta/negroni/..</a>."<br>
2015/11/04 18:25:14 Checking out git revision "refs/tags/v0.1"<br>
2015/11/04 18:25:14 Determining upstream version number<br>
2015/11/04 18:25:14 Package version is "0.0~git20140530.0.46a638d"<br>
2015/11/04 18:25:14 Determining package type<br>
2015/11/04 18:25:14 Determining dependencies<br>
[..]<br>
<br>
I need to go in and manually edit the d/changelog version number to be 0.1-1 whereas it<br>
would be nice if this were done using a command line option.<br>
<br>
Mind you not many packages I’ve seen have actual released versions.  I think I’ve recently<br>
uploaded about 10 and only two had releases.<br>
<br>
Thanks again for dh-make-golang!<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Tim.</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Best regards,<br>Michael</div>
</div>