-
Notifications
You must be signed in to change notification settings - Fork 28
[BREAKING] Change publish cmd to not mutate version #218
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
base: master
Are you sure you want to change the base?
Conversation
type: string; | ||
} | ||
|
||
export const version: CommandModule<CliGlobalOptions, CliCommandOptions> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version
is a name that says nothing, what about bumpVersion
?
This is great, consulting the real source for bumping packages version.
Related to breaking changes: I have not seen any package in Github using the commands that will be deprecated by this release: |
But it's still a breaking change, see https://semver.org/ for guidelines
Yeah, the flow will change. Actions should
We can add those steps in the github actions command to simplify downstream code. Since the actions blindly install the latest SDK version we just have to do those changes in the same version bump, but not necessarily in this PR
I don't really care about the list command, I just add it because the logic is already there and could be useful to someone? I would be okay removing. The |
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