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

Pubspec file is getting updated with invalid version tag. #843

Open
subhroacharjee opened this issue Oct 25, 2023 · 0 comments
Open

Pubspec file is getting updated with invalid version tag. #843

subhroacharjee opened this issue Oct 25, 2023 · 0 comments
Assignees
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@subhroacharjee
Copy link

TL;DR

If a release pull request is made to increment the minor version, and there exist multiple pre-releases following to it, the pubspec file within the release pull request will have an invalid version, as shown in the images below.

Screenshot 2023-10-25 at 8 27 05 AM

Screenshot 2023-10-25 at 8 16 23 AM

Expected behavior

The intended functionality is that if the release pull request is for version v2.1.0, the pubspec file should also be updated to version v2.1.0 without being affected by any +-rc tags, even if there are multiple pre-release following the release pr.

Observed behavior

If a release pull request is created to increase the minor version, and there are multiple subsequent pre-releases, the pubspec file within the release pull request will have a version that combines the new release version with the current+1 pre-release version. For instance, if the release pull request is for version v2.1.0 and the current pre-release is v2.0.1-rc.2, the pubspec file version in the release pull request will be v2.1.0+-rc.3, which is an invalid version.

Action YAML

name: Release Please
description: >
  Release Please automates CHANGELOG generation, the creation of GitHub releases, and version bumps for your projects.
inputs:
  github-token:
    required: true
    description: GitHub token for creating the release PR
  default-branch:
    required: false
    description: Branch to open pull release PR against (detected by default)
runs:
  using: composite
  steps:
    - id: release
      uses: google-github-actions/release-please-action@v3
      with:
        token: ${{ inputs.github-token }}
        command: manifest
        default-branch: ${{ inputs.default-branch }}

Log output

No response

Additional information

release-please-config.json

{
  "separate-pull-requests": true,
  "packages": {
    ".": {
      "changelog-path": "CHANGELOG.md",
      "release-type": "dart",
      "bump-minor-pre-major": true,
      "bump-patch-for-minor-pre-major": true,
      "extra-files": ["pubspec.yaml"],
      "draft": false,
      "prerelease": false,
      "include-component-in-tag": false,
      "component": ""
    }
  },
  "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
@SurferJeffAtGoogle SurferJeffAtGoogle added priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Oct 25, 2023
@chingor13 chingor13 removed the bug label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants