Bug 453346 - logme.rb does not produce any output on releasing libalkimia
Summary: logme.rb does not produce any output on releasing libalkimia
Status: RESOLVED FIXED
Alias: None
Product: releaseme
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-03 14:38 UTC by Ralf Habacker
Modified: 2022-05-03 20:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2022-05-03 14:38:40 UTC
SUMMARY

After tagging a release tarme.rb told me to generate a changelog by running logme.rb, which unfortunally does not generate output

STEPS TO REPRODUCE
1. clone KDE git repo for releaseme into $HOME/src and install required ruby interpreter
2. clone git repo for alkimia into $HOME/src
3. enter $HOME/src/alkimia
4. run ../releaseme/tarme.rb
5. run ../releaseme/logme.rb

OBSERVED RESULT
logme.rb prints the following line, but without any changelog entries
--- alkimia ---

Running `../releaseme/logme.rb --help` to see if there are any required option prints nothing

EXPECTED RESULT
logme.rb should print changelog entries

SOFTWARE/OS VERSIONS
Linux: openSUSE Leap 15.3
Comment 1 Harald Sitter 2022-05-03 14:40:49 UTC
Pretty sure logme generates a html file.
Comment 2 Ralf Habacker 2022-05-03 14:43:25 UTC
(In reply to Harald Sitter from comment #1)
> Pretty sure logme generates a html file.

You are refering to a file named "<project>.html" ? It is mostly empty as shown below.
ls alkimia.html -l
-rw-r--r-- 1 user users 10  3. Mai 16:36 alkimia.html
~/src/alkimia> cat alkimia.html 
<ul>
</ul>
Comment 3 Harald Sitter 2022-05-03 18:39:38 UTC
How did you run releaseme
Comment 4 Harald Sitter 2022-05-03 18:39:46 UTC
tarme that is
Comment 5 Ralf Habacker 2022-05-03 18:54:15 UTC
(In reply to Harald Sitter from comment #3)
> How did you run releaseme
.$ ./releaseme/tarme.rb --origin stable --version 8.1.1  alkimia

$ cat release_data 
alkimia;8.1;b516a00ebd392abf8bd9174343d34cdd85d136d7;alkimia-8.1.1.tar.xz;59f11fb7a8ef1fe79ca2e6650ac34b215386f8cc8393e4ec1e6a2ae6bc306d69
Comment 6 Ralf Habacker 2022-05-03 19:10:44 UTC
(In reply to Ralf Habacker from comment #5)
> (In reply to Harald Sitter from comment #3)
> > How did you run releaseme
> .$ ./releaseme/tarme.rb --origin stable --version 8.1.1  alkimia

and then 

$ ./releaseme/tagme.rb --version 8.1.1

> $ cat release_data 
> alkimia;8.1;b516a00ebd392abf8bd9174343d34cdd85d136d7;alkimia-8.1.1.tar.xz;
> 59f11fb7a8ef1fe79ca2e6650ac34b215386f8cc8393e4ec1e6a2ae6bc306d69

The commit id in column 3 refers to the tagged commit [1] 

commit b516a00ebd392abf8bd9174343d34cdd85d136d7 (tag: v8.1.1, origin/8.1)
Author: Ralf Habacker <ralf.habacker@freenet.de>
Date:   Tue May 3 13:38:33 2022 +0200

    Update version to 8.1.1

and in logme.rb there is: 

  def parse(rev)
    ancestor = `git describe --abbrev=0 --tags`.strip
    lines = `git log #{ancestor}..#{rev} --oneline --no-merges`

As  `ancestor` there is returned  
$ git describe --abbrev=0 --tags
v8.1.1

and the given parameter rev points to [1], which is the same commit.

I think `ancestor` needs instead to point to the previous release tag, which would be v8.1.0 in this case.
Comment 7 Harald Sitter 2022-05-03 19:11:20 UTC
You'd have to fetch the log before tagging. The latest tag is always assumed to be the ancestor.
Comment 8 Ralf Habacker 2022-05-03 19:36:56 UTC
(In reply to Harald Sitter from comment #7)
> You'd have to fetch the log before tagging. The latest tag is always assumed
> to be the ancestor.
https://community.kde.org/ReleasingSoftware#Creating_a_Tarball refers to run tarme.rb, which suggests the opposite order
$ ./releaseme/tarme.rb --origin stable --version 8.1.1  alkimia
...
############################ 
Tarball Done!

# Next Steps

Create a maintenance branch
    ./branchme.rb --help

Tag the release
    ./tagme.rb --help

Create a changelog
    ./logme.rb --help

See https://invent.kde.org/sdk/releaseme/-/blob/master/lib/releaseme/data/release_help.txt.erb
Comment 9 Harald Sitter 2022-05-03 19:39:50 UTC
Git commit c5108733b76738f481bcd40bc7641b048b954e03 by Harald Sitter.
Committed on 03/05/2022 at 19:39.
Pushed by sitter into branch 'master'.

reorder documention

lest we get confused about the order of commands (although I believe
this message never was meant to communicate order)

M  +3    -3    lib/releaseme/data/release_help.txt.erb

https://invent.kde.org/sdk/releaseme/commit/c5108733b76738f481bcd40bc7641b048b954e03
Comment 10 Ralf Habacker 2022-05-03 19:49:02 UTC
(In reply to Harald Sitter from comment #9)
> Git commit c5108733b76738f481bcd40bc7641b048b954e03 by Harald Sitter.
> reorder documention

Thanks.

In case the tag already exists, it would be helpful to have a command line parameter to specify the predecessor e.g. --ancestor=<tag> or even better if logme.rb would be able to detect this case itself.
Comment 11 Harald Sitter 2022-05-03 19:54:49 UTC
Patches welcome :)
Comment 12 Ralf Habacker 2022-05-03 20:42:24 UTC
Git commit 90221ff9aecbaf4f94c621b8192ba4777ae3464d by Ralf Habacker.
Committed on 03/05/2022 at 20:28.
Pushed by sitter into branch 'master'.

Add command line parameter '--ancestor=TAG' to logme.rb

M  +25   -3    logme.rb

https://invent.kde.org/sdk/releaseme/commit/90221ff9aecbaf4f94c621b8192ba4777ae3464d