Skip to content

Add a tool command to upgrade the common-api repo dependency #41

@leandro-lucarella-frequenz

Description

From https://github.com/frequenz-floss/frequenz-api-microgrid/blob/v0.x.x/CONTRIBUTING.md:

Upgrading dependencies
======================

If you want to update the dependency `frequenz-api-common`, then you need to
* update the submodule `frequenz-api-common`
* update the version of the `frequenz-api-common` package in `pyproject.toml`
* update the version of the `frequenz-api-common` package in
`minimum-requirements-ci.txt`

The version of `frequenz-api-common` used in all the three places mentioned
above should be the same.

Here is an example of upgrading the `frequenz-api-common` dependency to version
`v0.2.0`:
```sh
ver="0.2.0"
cd submodules/frequenz-api-common
git remote update
git checkout v${ver}
cd ../..
sed s/"frequenz-api-common == [0-9]\.[0-9]\.[0-9]"/"frequenz-api-common == ${ver}"/g -i pyproject.toml
sed s/"frequenz-api-common == .*"/"frequenz-api-common == ${ver}"/g -i minimum-requirements-ci.txt
```

This could be automated by adding some command like frequenz-repo-config update-submodule frequenz-api-common v0.5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:cliAffects the command-line toolpart:only-apiAffects the configuration of a api repotype:enhancementNew feature or enhancement visitble to users

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions