Skip to content

Commit

Permalink
ci: update Flutter tag filtering logic to remove build number
Browse files Browse the repository at this point in the history
  • Loading branch information
brenodt authored and MathJud committed Nov 17, 2022
1 parent 450893b commit 524fd22
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ workflows:
else
echo ' "run-flutter-tagged-workflow": true'
fi
fi
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(\-[a-zA-Z]*(\.[0-9]+)?)?(\+([0-9])+)?.*$ ]]; then
elif [[ "$CIRCLE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(\-[a-zA-Z]*(\.[0-9]+)?)?(\+([0-9])+)?.*$ ]]; then
if [[ "$CIRCLE_TAG" =~ ^.*-android$ ]]; then
echo ' "run-rust-android-tagged-workflow": true'
elif [[ "$CIRCLE_TAG" =~ ^.*-ios$ ]]; then
Expand Down
6 changes: 3 additions & 3 deletions .circleci/continue-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ jobs:
name: Add utilities/bin to PATH
- run:
command: |
VERSION=$(grep "version:" pubspec.yaml | awk '{ print $2}')
VERSION=$(grep "version:" pubspec.yaml | awk '{ print $2 }' | sed 's/+.*$//')
TAG="v${VERSION}"
cd artifacts
Expand Down Expand Up @@ -934,8 +934,8 @@ jobs:
steps:
- checkout-project
- run:
command: |-
VERSION=$(grep "version:" pubspec.yaml | awk '{ print $2}')
command: |
VERSION=$(grep "version:" pubspec.yaml | awk '{ print $2 }' | sed 's/+.*$//')
TAG="v${VERSION}-flutter"
if [ $TAG != $CIRCLE_TAG ]; then
echo "Git tag: $CIRCLE_TAG does not match the version of this app: $TAG"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ steps:
- run:
name: Publish Release on GitHub
command: |
VERSION=$(grep "version:" pubspec.yaml | awk '{ print $2}')
VERSION=$(grep "version:" pubspec.yaml | awk '{ print $2 }' | sed 's/+.*$//')
TAG="v${VERSION}"
cd artifacts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ steps:
- run:
name: Verify that Git tag matches Flutter version
command: |
VERSION=$(grep "version:" pubspec.yaml | awk '{ print $2}')
VERSION=$(grep "version:" pubspec.yaml | awk '{ print $2 }' | sed 's/+.*$//')
TAG="v${VERSION}-flutter"
if [ $TAG != $CIRCLE_TAG ]; then
echo "Git tag: $CIRCLE_TAG does not match the version of this app: $TAG"
echo "Please update app version at qaul_ui/pubspec.yaml"
exit 1
fi
fi
3 changes: 1 addition & 2 deletions circleci_config/config-setup/workflows/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ jobs:
else
echo ' "run-flutter-tagged-workflow": true'
fi
fi
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(\-[a-zA-Z]*(\.[0-9]+)?)?(\+([0-9])+)?.*$ ]]; then
elif [[ "$CIRCLE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(\-[a-zA-Z]*(\.[0-9]+)?)?(\+([0-9])+)?.*$ ]]; then
if [[ "$CIRCLE_TAG" =~ ^.*-android$ ]]; then
echo ' "run-rust-android-tagged-workflow": true'
elif [[ "$CIRCLE_TAG" =~ ^.*-ios$ ]]; then
Expand Down

0 comments on commit 524fd22

Please sign in to comment.