feat!: build: separate miner and node version strings #12035
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposal asking for feedback.
This removes
build.BuildVersion
andbuild.UserVersion()
and replaces them withbuild.NodeBuildVersion
,build.MinerBuildVersion
andbuild.NodeUserVersion()
,build.MinerUserVersion()
so they can be incremented separately.Why? Because as per #12010 we would like to be able to release them separately. This has two problems:
-dev
and tag it, you can build both miner and node with that version string and it looks official. But, we may be prepared to release one and not the other (node vs miner) and may consider one of them not release-ready so not deserving of an official release.I'm thinking that we could copy the ipdx
version.json
pattern implemented by https://github.com/ipdxco/unified-github-workflows/blob/main/.github/workflows/release-check.yml but with some minor tweaks.Instead of doing the version.json check:
version="$(gh api -X GET "repos/$HEAD_FULL_NAME/contents/version.json" -f ref="$HEAD_SHA" --jq '.content' | base64 -d | jq -r '.version')"
We could run two checks on PRs (probably just on the
releases
branch?):Then, for both:
-dev
, no more need for further checks.Node
orMiner
and then either runmake deps lotus
ormake deps lotus-miner lotus-worker
and also probably do something different on the release draft.I'm not sure yet what it should do if they both pass that, probably that just shouldn't be allowed and it has an error condition with a "nope" comment in the PR.