Skip to content

Commit

Permalink
🐛 Fix chopper_built_value pub.dev topics (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse authored Sep 2, 2023
1 parent 7833e70 commit b969ea0
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,19 @@ jobs:
dart pub get
echo "IS_VERSION_GREATER=$(dart run compare_versions.dart $THIS_VERSION $BASE_VERSION_${{ matrix.package }})" >> $GITHUB_ENV
popd || exit
- name: Validate pub.dev topics
id: validate_pub_dev_topics
run: |
set -e
pushd ${{ matrix.package }} || exit
pattern="^[a-z][a-z0-9-]*[a-z0-9]$"
for topic in $(yq -r '.topics[]' pubspec.yaml); do
if [[ ! $topic =~ $pattern ]]; then
echo "Invalid topic: $topic"
exit 1
fi
done
popd || exit
- name: Set up pub credentials
id: credentials
if: ${{ env.IS_VERSION_GREATER == 1 }}
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/publish_dry_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ jobs:
dart pub get
echo "IS_VERSION_GREATER=$(dart run compare_versions.dart $THIS_VERSION $BASE_VERSION_${{ matrix.package }})" >> $GITHUB_ENV
popd || exit
- name: Validate pub.dev topics
id: validate_pub_dev_topics
run: |
set -e
pushd ${{ matrix.package }} || exit
pattern="^[a-z][a-z0-9-]*[a-z0-9]$"
for topic in $(yq -r '.topics[]' pubspec.yaml); do
if [[ ! $topic =~ $pattern ]]; then
echo "Invalid topic: $topic"
exit 1
fi
done
popd || exit
- name: Publish (dry run)
id: publish_dry_run
if: ${{ env.IS_VERSION_GREATER == 1 }}
Expand Down
4 changes: 4 additions & 0 deletions chopper_built_value/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.0.1+1

- Fix pub.dev topic in package metadata ([#498](https://github.com/lejard-h/chopper/pull/498))

## 2.0.1

- Add pub.dev topics to package metadata ([#495](https://github.com/lejard-h/chopper/pull/495))
Expand Down
4 changes: 2 additions & 2 deletions chopper_built_value/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: chopper_built_value
description: A built_value based Converter for Chopper.
version: 2.0.1
version: 2.0.1+1
documentation: https://hadrien-lejard.gitbook.io/chopper/converters/built-value-converter
repository: https://github.com/lejard-h/chopper

Expand All @@ -27,4 +27,4 @@ dependency_overrides:
topics:
- codegen
- converter
- built_value
- built-value

0 comments on commit b969ea0

Please sign in to comment.