Skip to content
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

Publish things under the new name (gel-server, gel-cli, gel-ls) #137

Merged
merged 1 commit into from
Feb 10, 2025
Merged

Conversation

elprans
Copy link
Member

@elprans elprans commented Feb 8, 2025

Original package definitions remain unchanged so that back branches can
continue to be built and published as edgedb. .deb and .rpm platforms
publish "transitional" packages with old names which pull the new-named
package as the dependency.

Original package definitions remain unchanged so that back branches can
continue to be built and published as `edgedb`.  .deb and .rpm platforms
publish "transitional" packages with old names which pull the new-named
package as the dependency.
Comment on lines +62 to +74
def get_prepare_script(self, build: targets.Build) -> str:
script = super().get_prepare_script(build)
sed = build.sh_get_command("sed")
src = build.get_source_dir(self, relative_to="pkgbuild")
script += textwrap.dedent(
f"""\
{sed} -i -e '/\\[\\[bin\\]\\]/,/\\[\\[.*\\]\\]/{{
s/^name\\s*=.*/name = "{self.marketing_slug}"/;
}}' \\
"{src}/Cargo.toml"
"""
)
return script
Copy link
Contributor

Choose a reason for hiding this comment

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

Just rename the binary after compilation.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure that would be simpler. Is there a downside in doing it the sed way?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd consider /\\[\\[bin\\]\\]/,/\\[\\[.*\\]\\]/ a downside.

But if you don't go ahead.

Comment on lines +82 to +100
class EdgeDBCLI(GelCLI):
title = "EdgeDBCLI"
ident = "edgedb-cli"
description = "EdgeDB Command Line Tools"
url = "https://edgedb.com/"

@property
def marketing_name(self) -> str:
return "EdgeDB"

@property
def marketing_slug(self) -> str:
return "edgedb"

def get_transition_packages(
self,
build: targets.Build,
) -> list[str]:
return []
Copy link
Contributor

Choose a reason for hiding this comment

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

CLI has a default feature gel, which controls what we write out in messages (Connecting to Gel Cloud/Connecting to EdgeDB Cloud).

I think you'd want to disable that feature for the edgedb-cli package. Cargo has --no-default-features.

Copy link
Member Author

Choose a reason for hiding this comment

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

The edgedb-cli package is intended for old branches, we shouldn't be building new CLIs with that class.

@elprans elprans merged commit ad01eb1 into master Feb 10, 2025
2 checks passed
@elprans elprans deleted the gel branch February 10, 2025 18:58
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