pkgxdev / pantry

pkg manifests
https://pkgx.dev/pkgs/
161 stars 112 forks source link

how to add untagged code? #6521

Open tannevaled opened 6 days ago

tannevaled commented 6 days ago

Hi,

i would like to package the docker-convenient-script but the repository https://github.com/docker/docker-install never tag. What is the best practice to have, for example, a weekly or a monthly package? (https://calver.org/) How to start the packaging from this repository GithubActions without tagging on docker/docker-install?

Best regards

jhheider commented 6 days ago

While it's not clear to me that it's a good idea to package that repo (we don't package pkxgdev/setup, after all), since it's intended to be an always-up-to-date webscript, we do have some packages that don't have tags/releases packaged. It's generally done like this:

https://github.com/pkgxdev/pantry/blob/main/projects/crates.io/albion_terminal_rpg/package.yml

jhheider commented 6 days ago

as for adding new versions, that would need to be done manually. best bet, if you think they'd be amenable, is to see if the owner of that repo would be interested in tagging releases so automated tools can catch updates.

tannevaled commented 6 days ago

as for adding new versions, that would need to be done manually. best bet, if you think they'd be amenable, is to see if the owner of that repo would be interested in tagging releases so automated tools can catch updates.

i just asked them for a calendar based versioning

tannevaled commented 6 days ago

While it's not clear to me that it's a good idea to package that repo (we don't package pkxgdev/setup, after all), since it's intended to be an always-up-to-date webscript, we do have some packages that don't have tags/releases packaged. It's generally done like this:

https://github.com/pkgxdev/pantry/blob/main/projects/crates.io/albion_terminal_rpg/package.yml

based on that sample, is it possible (i confess i did not tried myself) to have a scripted versionning?

versions:
  # FIXME: no versions tagged/released yet
  # github: rmj1001/albion-rpg
  - 2024.5.7
  - sh: date -I
jhheider commented 6 days ago

in theory anything is possible; support for that would need to go into pkgxdev/brewkit. the tricky part, to my mind, is determining which commit to use for a given "calver", since most projects will have multiple commits per day, and they won't always be "working" in one sense or another.

felipecrs commented 3 days ago

@jhheider, does pkgx support semver pre-release tags? If yes, something like:

0.0.0-gitshahere.0
0.0.0-anothergitshahere.0

Would work.

felipecrs commented 3 days ago

Or maybe this kind of thing would be better suited for mash.

jhheider commented 3 days ago

mash is a good answer. i don't believe libpkgx's semver implementation (combined with brewkit's understanding) supports pre-release tags. a potentially interesting option would be to support:

ditributable:
  url: https://github.com/foo/bar/archive/{{ version.commit }}.tar.gz

version:
  # produces 0.0.0.{{ version.commit }}
  github: foo/bar/commits

but it would need support across the whole stack for 0.0.0.$sha, so it's a complicated idea.