flakestry / flakestry.dev

A public central registry of Nix flakes.
https://flakestry.dev
Apache License 2.0
93 stars 8 forks source link

Rolling release support #26

Closed dr460nf1r3 closed 4 months ago

dr460nf1r3 commented 8 months ago

Hello! Nice to see another attempt for a flake registry :)

From what I read in on the publish page, flakestry.dev currently only supports flakes working with tags, is that correct? We would like to publish Nyx here, but we don't make use of tags and mostly have daily commits.

domenkozar commented 8 months ago

There are two ways to support that:

a) v1.0.<unix epoch> b) v1.0.<commits>

The easiest to implement is a) and you can do that today yourself something like:


- name: Retrieve unix date time
  shell: bash
  run: echo "TIME=$(date '+%s')" >> $GITHUB_ENV
- uses: flakestry/flakestry-publish@main
  with:
    version: "v1.0.${{ env.TIME }}"
PedroHLC commented 8 months ago

The Fetching the repository phase in flakestry/flakestry-publish@main, seems to try to: git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/v0.1.1*:refs/remotes/origin/v0.1.1* +refs/tags/v0.1.1*:refs/tags/v0.1.1

Which won't work if the tag does not exists, right?

domenkozar commented 8 months ago

Good point, currently we assume it's a tag.

Not sure yet what to do about it, probably we should allow releases be just a commit.

kip93 commented 8 months ago

Would also love to publish here too, but have the same problem.

There might be some other random reference or the such, but these 2 seem to be the core of what would need to be touched:

I'll play a bit with it this weekend to enable non-tag releases and hopefully create a PR (:

domenkozar commented 8 months ago

That would be fantastic!