Skip to content

Add Distribution information to status and version command.#1129

Open
FSG-Cat wants to merge 2 commits into
mainfrom
FSG-Cat/Distro-Build-Info-Status
Open

Add Distribution information to status and version command.#1129
FSG-Cat wants to merge 2 commits into
mainfrom
FSG-Cat/Distro-Build-Info-Status

Conversation

@FSG-Cat
Copy link
Copy Markdown
Member

@FSG-Cat FSG-Cat commented May 9, 2026

This came up today in a discussion about the various ways Draupnir can be installed and distributed that its probably useful to have this little mechanism to define where your Draupnir build originated.

This is essentially Cat CTRL-C/V on the branch metadata.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 9, 2026

🦋 Changeset detected

Latest commit: 1d4a50b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
draupnir Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@FSG-Cat FSG-Cat requested a review from Gnuxie May 10, 2026 16:29
"build:assets": "npm run describe-version && npm run describe-branch && npm run describe-distribution",
"describe-version": "(git describe > version.txt.tmp && mv version.txt.tmp version.txt) || true && rm -f version.txt.tmp",
"describe-branch": "(git rev-parse --abbrev-ref HEAD > branch.txt.tmp && mv branch.txt.tmp branch.txt) || true && rm -f branch.txt.tmp",
"describe-distribution": "echo \"${DRAUPNIR_DISTRIBUTION:-source}\" > distribution.txt.tmp && mv distribution.txt.tmp distribution.txt",
Copy link
Copy Markdown
Member

@Gnuxie Gnuxie May 10, 2026

Choose a reason for hiding this comment

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

what is a "build time" distribution?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Gnuxie im confused what your refering to?

And as for what the purpose of this is. Its quite simple its to help us get information about where a draupnir comes from.

How was it built and who is to blame for the environment that builds it. For example is the bot built from source then we can start to question the build environment in ways we cant if the bot came from the official CI.

Its also useful for Nix as well Nix currently appends nix to the version string but its tbh better to have that kind of shit be a dedicated attribute.

This is also useful for the 2 or 3 native packages for Draupnir that exist in the wild. Yes OpenSUSE as far as i know has one.

We have no way of knowing the install method unless we coax that information out of the end users and this data would make it easier for us to define a workflow where the first thing we want is that data if the bot boots far enough to cough it up.

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