Skip to content

CLI: build with dist #1593

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

Merged
merged 1 commit into from
Jan 2, 2025
Merged

CLI: build with dist #1593

merged 1 commit into from
Jan 2, 2025

Conversation

svix-onelson
Copy link
Contributor

@svix-onelson svix-onelson commented Dec 26, 2024

Adds workflows and supporting configs to use dist for building and publishing binaries for the CLI.

To lean towards dist's happy path, a top-level Cargo.toml defines a workspace including any cargo projects we want to build and distribute (currently just svix-cli).

The dist-workspace.toml includes various parameters set by dist init to configure the generation of .github/workflows/release.yml.

dist-workspace.toml can be edited manually, but the release.yml should only be changed via dist generate.

Installers

Currently, the shell, powershell and msi installers are configured.

dist also provides:

  • npm
  • homebrew (we'll definitely enable this one once we know everything looks good)

The current selection are essentially "curl to sh" (and the Windows equivalent) like is commonly done for rustup and seemed like the closest thing we'd see to a "hello world." My plan is to enable more in subsequent releases.

The msi installer includes a full installer wizard type deal.

Releasing

These notes are for the folks doing releases once this lands. The gist is:

  • run the version bump script as normal
  • push the tag for the release
  • create a draft Release for the tag
  • manually run the Release workflow (which is managed by dist) specifying the tag.

image

The Release workflow uses the tag to find the draft release so it can publish its build artifacts there.

The last thing this workflow does is mark the Release as published, so be sure to update the release notes and so on before running this workflow.

@svix-onelson svix-onelson force-pushed the onelson/cli-build-with-dist branch 3 times, most recently from 0ce1afa to fa19730 Compare December 27, 2024 02:56
svix-onelson added a commit that referenced this pull request Dec 30, 2024
This is to help clarfiy what the binary actually is among the rest of
the svix tooling in the repo.

Looking forward, this will also help to keep the naming scheme
consistent between the binary, the package name, and the updater while
handling distribution via `dist` (pending PR:
#1593)
svix-onelson added a commit that referenced this pull request Dec 30, 2024
This is to help clarify what the binary actually is among the rest of
the svix tooling in the repo.

Looking forward, this will also help to keep the naming scheme
consistent between the binary, the package name, and the updater while
handling distribution via `dist` (pending PR:
#1593)
@svix-onelson svix-onelson changed the base branch from main to onelson/cli-bin-name December 30, 2024 22:54
@svix-onelson svix-onelson force-pushed the onelson/cli-build-with-dist branch from fa19730 to c74a891 Compare December 30, 2024 23:25
svix-onelson added a commit that referenced this pull request Dec 30, 2024
This is to help clarify what the binary actually is among the rest of
the svix tooling in the repo.

Looking forward, this will also help to keep the naming scheme
consistent between the binary, the package name, and the updater while
handling distribution via `dist` (pending PR:
#1593)
Base automatically changed from onelson/cli-bin-name to main December 30, 2024 23:56
@svix-onelson svix-onelson force-pushed the onelson/cli-build-with-dist branch 2 times, most recently from e227982 to b4f897b Compare December 31, 2024 01:08
@svix-onelson svix-onelson changed the base branch from main to onelson/track-codegen-sources-rust December 31, 2024 01:34
@svix-onelson svix-onelson force-pushed the onelson/cli-build-with-dist branch 2 times, most recently from 39b036e to b998afe Compare December 31, 2024 01:52
Base automatically changed from onelson/track-codegen-sources-rust to main December 31, 2024 17:35
@svix-onelson svix-onelson force-pushed the onelson/cli-build-with-dist branch from b998afe to c5094d5 Compare December 31, 2024 17:53
@svix-onelson svix-onelson force-pushed the onelson/cli-build-with-dist branch from c5094d5 to 66042cd Compare December 31, 2024 19:44
@svix-onelson svix-onelson marked this pull request as ready for review December 31, 2024 20:58
@svix-onelson svix-onelson requested a review from a team as a code owner December 31, 2024 20:58
svix-onelson added a commit that referenced this pull request Dec 31, 2024
The text in this readme is based largely on the one from the old Go CLI.

Some sections have been removed since support for the thing being
mentioned was not carried forward (e.g. `--data-*` flags and also piping
json bodies in which apparently our new clap-based parser doesn't do).

Installer instructions are limited to the initial set offered via
#1593

More sections will be added to describe `homebrew`/`cargo` installation
once available.
svix-onelson added a commit that referenced this pull request Dec 31, 2024
The text in this readme is based largely on the one from the old Go CLI.

Some sections have been removed since support for the thing being
mentioned was not carried forward (e.g. `--data-*` flags and also piping
json bodies in which apparently our new clap-based parser doesn't do).

Installer instructions are limited to the initial set offered via
#1593

More sections will be added to describe `homebrew`/`cargo` installation
once available.
svix-onelson added a commit that referenced this pull request Dec 31, 2024
The text in this readme is based largely on the one from the old Go CLI.

Some sections have been removed since support for the thing being
mentioned was not carried forward (e.g. `--data-*` flags and also piping
json bodies in which apparently our new clap-based parser doesn't do).

Installer instructions are limited to the initial set offered via
#1593

More sections will be added to describe `homebrew`/`cargo` installation
once available.
svix-onelson added a commit that referenced this pull request Dec 31, 2024
The text in this readme is based largely on the one from the old Go CLI.

Some sections have been removed since support for the thing being
mentioned was not carried forward (e.g. `--data-*` flags and also piping
json bodies in which apparently our new clap-based parser doesn't do).

Installer instructions are limited to the initial set offered via
#1593

More sections will be added to describe `homebrew`/`cargo` installation
once available.
svix-onelson added a commit that referenced this pull request Dec 31, 2024
The text in this readme is based largely on the one from the old Go CLI.

Some sections have been removed since support for the thing being
mentioned was not carried forward (e.g. `--data-*` flags, import/export, and
also piping json bodies in which apparently our new clap-based parser doesn't
do).

Installer instructions are limited to the initial set offered via
#1593

More sections will be added to describe `homebrew`/`cargo` installation
once available.
svix-onelson added a commit that referenced this pull request Dec 31, 2024
The text in this readme is based largely on the one from the old Go CLI.

Some sections have been removed since support for the thing being
mentioned was not carried forward (e.g. `--data-*` flags, import/export, and
also piping json bodies in which apparently our new clap-based parser doesn't
do).

Installer instructions are limited to the initial set offered via
#1593

Since the version number appears in the script-based installer URLs,
`tools/bump_version.js` has been updated to also target this readme.

More sections will be added to describe `homebrew`/`cargo` installation
once available.
svix-onelson added a commit that referenced this pull request Dec 31, 2024
The text in this readme is based largely on the one from the old Go CLI.

Some sections have been removed since support for the thing being
mentioned was not carried forward (e.g. `--data-*` flags, import/export, and
also piping json bodies in which apparently our new clap-based parser doesn't
do).

Installer instructions are limited to the initial set offered via
#1593

Since the version number appears in the script-based installer URLs,
`tools/bump_version.js` has been updated to also target this readme.

More sections will be added to describe `homebrew`/`cargo` installation
once available.
@svix-onelson svix-onelson merged commit 0065239 into main Jan 2, 2025
9 checks passed
@svix-onelson svix-onelson deleted the onelson/cli-build-with-dist branch January 2, 2025 17:26
svix-onelson added a commit that referenced this pull request Jan 2, 2025
The text in this readme is based largely on the one from the old Go CLI.

Some sections have been removed since support for the thing being
mentioned was not carried forward (e.g. `--data-*` flags, import/export,
and
also piping json bodies in which apparently our new clap-based parser
doesn't
do).

Installer instructions are limited to the initial set offered via
#1593

Since the version number appears in the script-based installer URLs,
`tools/bump_version.js` has been updated to also target this readme.

More sections will be added to describe `homebrew`/`cargo` installation
once available.
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