[BREAKING] Change publish cmd to not mutate version #218
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.
Motivation
Current developer experience DX of the SDK is weird. The publish command mutates the source and publishes the mutated source without committing. This causes packages to reflect the wrong version in their manifest on master.
See the DAPPMANAGER as example:
https://github.com/dappnode/DNP_DAPPMANAGER/blob/18386a7b2abf0d9da1816b442be30f2cfd1b3a26/dappnode_package.json#L3
When latest published version is v0.2.49 🤔
The SDK should behave and be used like
npm
. You first mutate the source to bump the version withnpm version
, commit, then publish.Changes
Deprecate commands "next" and "increase". New list of commands is
sdk build
: Build, uploadsdk publish
: Build, upload and print TXsdk version
: Bump local fssdk init
: Init package dirsdk list
: List package's repo latest versionNow only the last step of publish is concerned with fetching blockchain data, only to check if a new contract must be deployed for that repo. To check the latest version use a separate command
sdk list
. This command set is equivalent to NodeJSnpm
flow and provides better separation of concerns.From #213