Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to identify commit from published document? #42

Open
mbtaylor opened this issue Nov 26, 2024 · 0 comments
Open

How to identify commit from published document? #42

mbtaylor opened this issue Nov 26, 2024 · 0 comments

Comments

@mbtaylor
Copy link
Member

When looking at a published REC/PR/WD it would often be useful to identify which commit it corresponds to. One scenario is doing a diff between two published versions or between the current HEAD and the last WD or whatever.

This is nearly supported by ivoatex as it stands: as per sec 3.8 if you write \input gitmeta in the source, then some text like:

Version Control
    Revision 9562355, last change 2024-10-02 12:01:06 +0200

will appear in the generated PDF or HTML document. But unfortunately (as in the above case taken from REC-RegTAP-1.2) the commit hash often ends up not being visible in the checked out repository, since it's on a branch which ends up disappearing (it's not on the master/main). This is likely to happen if you follow the instructions in sec 3.12 about how to prepare and submit a document release for publication.

One way to fix this would therefore be to modify the instructions in Sec 3.12 to make sure that the publication commit ends up on master/main; that's somewhat complicated because of the recommended PullRequest-based workflow, though not impossible if some rebasing is done. But a better alternative might just be to recommend that a named tag with the obvious name (e.g. "REC-RegTAP-1.2") is pushed to the repository once the publish has been done, by whoever has permissions to do that. This could be done after the fact (e.g. now, for all published document versions that we care about).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant