Skip to content

feat: add @erpc-cloud/cli + publish package via CI#143

Merged
aramalipoor merged 14 commits intoerpc:mainfrom
KONFeature:feat/erpc-cli-npmjs
Jan 23, 2025
Merged

feat: add @erpc-cloud/cli + publish package via CI#143
aramalipoor merged 14 commits intoerpc:mainfrom
KONFeature:feat/erpc-cli-npmjs

Conversation

@KONFeature
Copy link
Copy Markdown
Contributor

Note: Need to add the NPM_TOKEN that will be use for publishing in the github action secret.

Add a new @erpc-cloud/cli typescript package that:

  • On install, download the binary corresponding to the user pc
  • Verify the file checksum against the known checksums for this version
  • Expose a binary that will execute the eRPC binary for the current version

Add some stuff to the CI:

  • Add a prerelease step that will contain:
    • fresh tygo typedef for config package
    • generated file for the cli (checksums and version info)
    • both package version upgrade (matching the desired erpc version)
  • Once the pre release pr is merged:
    • Tag the version like before
    • Do the goreleaser stuff like before
    • Publish the typescript package

@@ -0,0 +1,23 @@
#!/usr/bin/env node
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way in NPM to point directly to a binary without the process wrapper? That would be awesome to avoid an extra hop

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be doable, let me try that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so not working super well, basically we got a concurrency issue in the install hooks of the script, it's trying to create the bin symlinks before the end of the postInstall script, so when the bin isn't yet downloaded :/

@aramalipoor aramalipoor merged commit deab8f4 into erpc:main Jan 23, 2025
zekiblue pushed a commit to zekiblue/erpc that referenced this pull request May 6, 2025
* feat: startup @erpc-cloud/cli

* feat: checksum validation during installation

* chore: new ci release flow with npmjs release

* chore: remove release please go with dispatch

* test: test ci v1

* test: fix ci contain check

* fix: Only build docker with typescript/config package

* fix: Cleanup generated file before release commit + fix file path

* fix: Dont depend on prepare release for the release step

* fix: Disable git check on publish

* fix: Correct export of cli package

* chore: rollback test for PR

* chore: remove bin from pr

* chore: remove v2 tag on the release workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants