flakestry / flakestry.dev

A public central registry of Nix flakes.

Home Page:https://flakestry.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rolling release support

dr460nf1r3 opened this issue · comments

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.

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 }}"

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?

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.

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 (:

That would be fantastic!