pantry icon indicating copy to clipboard operation
pantry copied to clipboard

how to add untagged code?

Open tannevaled opened this issue 1 year ago • 8 comments

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

tannevaled avatar Jun 26 '24 12:06 tannevaled

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 avatar Jun 26 '24 14:06 jhheider

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.

jhheider avatar Jun 26 '24 14:06 jhheider

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 avatar Jun 26 '24 14:06 tannevaled

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

tannevaled avatar Jun 26 '24 14:06 tannevaled

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.

jhheider avatar Jun 26 '24 15:06 jhheider

@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 avatar Jun 29 '24 16:06 felipecrs

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

felipecrs avatar Jun 29 '24 16:06 felipecrs

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.

jhheider avatar Jun 29 '24 17:06 jhheider