nu_plugin_regex icon indicating copy to clipboard operation
nu_plugin_regex copied to clipboard

Tags on Release Commits

Open Talia-12 opened this issue 1 year ago • 5 comments

Would it be doable for you to add a tag to commits that you're publishing/have published to crates.io? It would make packaging for nixpkgs a bit cleaner.

Talia-12 avatar Sep 30 '24 12:09 Talia-12

maybe, if i can remember? how does it make it cleaner?

fdncred avatar Sep 30 '24 12:09 fdncred

here's an example of the kind of code that you see in a nix package, fetching the source code of the thing being packaged:

src = fetchFromGitHub {
  owner = "fennewald";
  repo = "nu_plugin_net";
  rev = "refs/tags/${version}";
  hash = "sha256-GOF2CSlsjI8PAmIxj/+mR01X5XMviEM8gj7ZYTbeX7I=";
};

if there's no tag to target the fetch of of you instead would have, e.g.,

rev = "c41f98632a538cad38ed0dd518340fb8eb28274e";

which works, but is significantly uglier and also significantly less readable as to why that git commit in particular was picked.

Talia-12 avatar Sep 30 '24 15:09 Talia-12

make sense. let's see if i remember next time. maybe i should just leave this open until then as a reminder?

fdncred avatar Sep 30 '24 15:09 fdncred

It should be pretty easy to go back and tag the commits that you made releases? I don't know if github has something inbuilt to do it, but if you grab the commit id you can tag that commit from the command line with e.g.

git tag 0.6 c41f98632a538cad38ed0dd518340fb8eb28274e

and then push that tag to github with git push origin --tags.

Talia-12 avatar Oct 01 '24 03:10 Talia-12

It would also be beneficial to users getting the package from crates.io, because it lets them see which commit a given version was built from.

aidalgol avatar Oct 04 '24 18:10 aidalgol

i remembered, yay me!

fdncred avatar Oct 21 '24 21:10 fdncred