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

Release: v3.0.0-alpha.1 #248

Closed
2 tasks done
josecelano opened this issue Mar 17, 2023 · 8 comments
Closed
2 tasks done

Release: v3.0.0-alpha.1 #248

josecelano opened this issue Mar 17, 2023 · 8 comments
Assignees

Comments

@josecelano
Copy link
Member

josecelano commented Mar 17, 2023

  • Publish the Github release
  • Publish crate on crates.io
josecelano added a commit that referenced this issue Mar 17, 2023
in order to publish the crates.
@josecelano
Copy link
Member Author

Hi @WarmBeer, I get an error trying to publish the crate.

I have to find out how to fix this error:

Updating crates.io index
error: all dependencies must have a version specified when publishing.
dependency `torrust-tracker-configuration` does not specify a version
Note: The published dependency will use the version from crates.io,
the `path` specification will be removed from the dependency declaration.
Error: Process completed with exit code [10](https://github.com/josecelano/torrust-tracker/actions/runs/4450248454/jobs/7815562925#step:4:11)1.

I assume that the command cargo publish should publish 5 crates with the same version: 3.0.0-alpha.1.

You can reproduce the error locally with:

$ cargo publish --dry-run
    Updating crates.io index
error: all dependencies must have a version specified when publishing.
dependency `torrust-tracker-configuration` does not specify a version
Note: The published dependency will use the version from crates.io,
the `path` specification will be removed from the dependency declaration.

@josecelano
Copy link
Member Author

@josecelano josecelano self-assigned this Mar 17, 2023
@josecelano
Copy link
Member Author

Hi @da2ce7 @WarmBeer, we have to review the release process. This is what we have now:

  • main and develop branches.
  • main branch has some protection rules. For example, it requires a review before merging.
  • We publish the new crate version with a workflow in a fork. The workflow is triggered for tags starting with the v prefix. That means anyone can create tags and run the workflows to publish the crates but the workflow only works if you have the crates.io token.

The problem is that we cannot guarantee that all tags have been published as a crate.

We could add a tag protection rule to restrict the creation of version tags.

@josecelano
Copy link
Member Author

The workflow has published two out of 5 packages:

Workflow: https://github.com/josecelano/torrust-tracker/actions/runs/4450910142/jobs/7817035784

I get the same error on the third :-/

By the way, we need to add a README to the new packages.

@josecelano
Copy link
Member Author

The error was fixed by adding the concrete version to the workspace packages:

354edec

torrust-tracker-primitives = { version = "3.0.0-alpha.1", path = "packages/primitives" }
torrust-tracker-configuration = { version = "3.0.0-alpha.1", path = "packages/configuration" }
torrust-tracker-located-error = { version = "3.0.0-alpha.1", path = "packages/located-error" }
torrust-tracker-test-helpers = { version = "3.0.0-alpha.1", path = "packages/test-helpers" }

I'm using the same version for all workspace packages. It is the recommended way. I guess we can do that until we extract them into independent repos.

When you build the app locally, I assume you get the latest build from the workspace package even if you specify the version because the version is inherited from the parent workspace.

@josecelano
Copy link
Member Author

Hey @da2ce7 send me your crates.io username so that I can add you as owner.

@da2ce7
Copy link
Contributor

da2ce7 commented Mar 19, 2023

@josecelano My username seems to be "da2ce7" as it is linked to my github account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants