googleapis / googleapis/release-please

Dart pubspec updater doesn't work as expected for prerelease.

Open
#2,400 0 comments 1 reaction 1 assignee Claimed by @chingor13 View on GitHub
priority: p3 type: bug
Dominant language
TypeScript
Stars
7.5k
Forks
588
Avg merge
12h 16m
Merged PRs (30d)
7

Description

### Overview
In case of defining a version with prerelease version and without build number in pubspec.yaml, [dart pubspec updater](https://github.com/googleapis/release-please/blob/64ffba96734bf158818121c067870077d903611b/src/updaters/dart/pubspec-yaml.ts) updates the version with build number.

#### Expected

The version should be updated prerelease version and build number.

#### Actual

Dart pubspec updater recognizes prerelease version as build number.
https://github.com/googleapis/release-please/blob/64ffba96734bf158818121c067870077d903611b/src/updaters/dart/pubspec-yaml.ts#L29C39-L29C66

You can confirm this behavior from [this PR](https://github.com/ronnnnn/thema/pull/8/files).

#### Environment details

- googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f

#### Steps to reproduce

1. Define version with prerelease version (like `version: 1.0.0-dev01`) on pubspec.yaml.
2. run googleapis/release-please-action on GitHub Actions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.