Add Distribution information to status and version command.#1129
Add Distribution information to status and version command.#1129FSG-Cat wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: 1d4a50b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
| "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", |
There was a problem hiding this comment.
what is a "build time" distribution?
There was a problem hiding this comment.
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.
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.