axodotdev / axodotdev/cargo-dist

fleshed out "nightly builds" system

Open
#1,143 2 comments 1 reaction 0 assignees View on GitHub
feature request
Dominant language
Rust
Stars
2.1k
Forks
149
Avg merge
1d 11h
Merged PRs (30d)
32

Description

A couple releases ago we shipped an undocumented feature called release-branch:

https://github.com/axodotdev/cargo-dist/blob/d97fc68880d963781aec462c72cd2c58cd3d142c/cargo-dist/src/config.rs#L245-L247

This feature is for a gitops-style "every push to this branch is a deploy". As part of this we force cargo-dist to select all publishable apps, take the maximum of their versions, and then append `-alpha.{timestamp}` to that version, and then pretend the all apps have that version:

https://github.com/axodotdev/cargo-dist/blob/d97fc68880d963781aec462c72cd2c58cd3d142c/cargo-dist/src/announce.rs#L511-L525

A lot of this is the machinery you might want for a "nightly release" but there are some potential differences/improvement:

* The cargo packages aren't actually modified to have the given version (so clap-based --version flags won't mention it's a nightly)
* While in a concrete case this is straight-forward, in the general case things are quite complicated with things like workspace-version-inheritance. I briefly looked into vendoring some code from release-plz but ended up discarding it when i got to the end.
* If you care about commiting and tagging your nightlies this raises a lot of questions about modifying the tree permanently
* For a "nightly" workflow you might want something more akin to a cron job than "every push"
* As seen in the comments, it would be nice for the version string to be a template

Contributor guide

Open the contributing guide

Research direction

Start with the release-branch configuration in cargo-dist/src/config.rs and the version-selection logic in cargo-dist/src/announce.rs. Compare the existing behavior with the listed nightly-build needs; the scope is not complete until version handling, trigger style, and version-template expectations are settled.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.