-
Notifications
You must be signed in to change notification settings - Fork 57
Description
At the moment, users need to wait for a proper release before start using a new feature in the TS SDK. Although the process is quite dynamic, it could take a few days before getting a release that aggregates many improvements together. The process also includes the manual step of creating the changelog.
My proposal is to add the right versioning and token in the Travis scripts so every time a PR is merged to master, Travis pushes a new alpha/snapshot to the npm repository. If a user is waiting for a fix, that fix will be included in npm automatically after the new master is merged.
This complements the full release, the full release should be done as always.
Using the snapshot, the NEM team can do extra checks and feedback before doing a release, by smoke testing the snapshot artifact in projects like the CLI, Sandbox, maybe wallet or explorer. Even the examples in the docs can be upgraded before the SDK is released. If we do that, the docs and the SDKs could be potentially released at the same time
Travis can generate and deploy versions like 0.17.1-ALPHA-20200220T120318 or 0.17.1-SNAPSHOT-20200220T120318.
Note that there is a timestamp prefixed. NPM doesn't allow redeployments of the same version. The timestamp is automatically generated by Travis. There is no manual process like writing down the version 0.17.1-ALPHA-1 or 0.17.1-ALPHA-2. This kills the automation, the merge and forget idea.
There would be one ALPHA version per PR merged with the same version number until the next full release is done, in this case, 0.17.1. Then the next alpha version would be 0.17.2-ALPHA-20200320T120318
The client dependency will be like:
`"nem2-sdk": "0.17.1-ALPHA-20200220T120318"
We are doing this in the java SDK and both Java and TS open API generated clients. It has helped us and it provides a super tight feedback/response loop to the user. For example, java sdk clients can use the 0.9.3.1 compatibily sdk by including the sanpshot version 0.16.4-SNAPSHOT
If somebody reports a bug and a few hours later the user has a snapshot fix to be used from a PR that has been reviewed, unit tested, approved and merged that's pretty cool.
Using the Snapshot is optional, the user can always depend on the released version like 0.17.0, 0.17.1.
An alternative would be having a different artifact name like nem2-sdk-alpha:0.17.1-20200220T120318
Travis necessary encrypted keys for the npm credentials are tight to the name of the repo. If this is done, it should be done after the renaming/rebranding.