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

feat(dev): add release-info command #6363

Merged
merged 7 commits into from
Jun 21, 2023
Merged

Conversation

bshaffer
Copy link
Contributor

@bshaffer bshaffer commented Jun 14, 2023

Command to display information about a released tag:

$ ./google-cloud release-info v0.208.0 
+--------------------------+--------------------------------+---------+
| component                | id                             | version |
+--------------------------+--------------------------------+---------+
| BillingBudgets           | cloud-billing-budgets          | 1.2.0   |
| Build                    | cloud-build                    | 0.7.2   |
| Container                | cloud-container                | 1.15.0  |
| Debugger                 | cloud-debugger                 | 1.5.1   |
| Deploy                   | cloud-deploy                   | 0.8.0   |
| DiscoveryEngine          | cloud-discoveryengine          | 0.3.0   |
| PubSub                   | cloud-pubsub                   | 1.43.1  |
| RapidMigrationAssessment | cloud-rapidmigrationassessment | 0.1.0   |
| Spanner                  | cloud-spanner                  | 1.61.0  |
+--------------------------+--------------------------------+---------+

The --format=json option can be used to parse the output from another script:

$ ./google-cloud release-info v0.208.0 --format=json
{
    "version": "v0.208.0",
    "releases": [
        {
            "component": "BillingBudgets",
            "id": "cloud-billing-budgets",
            "version": "1.2.0"
        },
        {
            "component": "Build",
            "id": "cloud-build",
            "version": "0.7.2"
        },
        {
            "component": "Container",
            "id": "cloud-container",
            "version": "1.15.0"
        },
        {
            "component": "Debugger",
            "id": "cloud-debugger",
            "version": "1.5.1"
        },
        {
            "component": "Deploy",
            "id": "cloud-deploy",
            "version": "0.8.0"
        },
        {
            "component": "DiscoveryEngine",
            "id": "cloud-discoveryengine",
            "version": "0.3.0"
        },
        {
            "component": "PubSub",
            "id": "cloud-pubsub",
            "version": "1.43.1"
        },
        {
            "component": "RapidMigrationAssessment",
            "id": "cloud-rapidmigrationassessment",
            "version": "0.1.0"
        },
        {
            "component": "Spanner",
            "id": "cloud-spanner",
            "version": "1.61.0"
        }
    ]
}

@bshaffer bshaffer requested review from a team as code owners June 14, 2023 20:24
@bshaffer bshaffer added the next release PRs to be included in the next release label Jun 14, 2023
dev/src/Command/ReleaseInfoCommand.php Outdated Show resolved Hide resolved
dev/src/Command/ReleaseInfoCommand.php Outdated Show resolved Hide resolved
$application = new Application();
$application->add(new ComponentInfoCommand());
self::$commandTester = new CommandTester($application->get('component-info'));
self::$commandTester = new CommandTester(new ComponentInfoCommand());
Copy link
Contributor Author

@bshaffer bshaffer Jun 21, 2023

Choose a reason for hiding this comment

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

This is just cleaning up / simplifying these tests, as we can just create the CommandTester directly when we don't need to test things like Question Helpers (e.g. $this->getHelper('question'))

TLDR: it's cleanup that is unrelated to the release-info command

$application = new Application();
$application->add(new DocFxCommand());
self::$commandTester = new CommandTester($application->get('docfx'));
self::$commandTester = new CommandTester(new DocFxCommand());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

same here

dev/tests/Unit/Command/ReleaseInfoCommandTest.php Outdated Show resolved Hide resolved
dev/tests/Unit/Command/ReleaseInfoCommandTest.php Outdated Show resolved Hide resolved
@bshaffer bshaffer added the release blocking Required feature/issue must be fixed prior to next release. label Jun 21, 2023
Copy link
Contributor

@saranshdhingra saranshdhingra left a comment

Choose a reason for hiding this comment

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

Minor nit. LGTM

dev/src/Command/ReleaseInfoCommand.php Outdated Show resolved Hide resolved
@bshaffer bshaffer enabled auto-merge (squash) June 21, 2023 20:38
@bshaffer bshaffer merged commit efa915f into main Jun 21, 2023
@bshaffer bshaffer deleted the add-release-info-commmand branch June 21, 2023 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next release PRs to be included in the next release release blocking Required feature/issue must be fixed prior to next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants