Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: Version improvements #268

Merged
merged 5 commits into from
Jul 9, 2024
Merged

all: Version improvements #268

merged 5 commits into from
Jul 9, 2024

Conversation

ReillyBrogan
Copy link
Contributor

The first and second commits centralize version handling to the top-level Cargo.toml file and add a MSRV respectively (one of the build deps has a MSRV on 1.78 which is why it's so high comparatively).

The third commit adds a new serpent_buildinfo crate which processes git info, version, and build timestamps during the build and exposes a simple API for boulder and moss to use. This uses the git CLI directly and should work with git workspaces. It should also work if a .git directory is not present (intended to work with #241) at which point it will only capture the version and build timestamp.

Since the serpent_buildinfo crate will be rebuilt on virtually all code changes I tried to ensure that it builds quickly. cargo::rerun-if-changed instructions are setup to rebuild it on any changes to source code directories (non-source code directories and files should be skipped).

It also respects SOURCE_DATE_EPOCH and will use that for the build timestamp if present.

Signed-off-by: Reilly Brogan <[email protected]>
Adds the serpent_buildinfo crate which performs several common build-metadata related tasks. Also updates boulder and moss to use the functions provided by this library instead of doing it themselves

Signed-off-by: Reilly Brogan <[email protected]>
Copy link
Member

@ikeycode ikeycode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ta :)

@ikeycode ikeycode merged commit 79e753d into main Jul 9, 2024
2 checks passed
@ikeycode ikeycode deleted the version branch July 9, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants