update build-flutter template

This commit is contained in:
linsui 2024-05-08 21:51:45 +08:00 committed by linsui
parent b6d6427e85
commit 88e05a61eb

View File

@ -2,6 +2,8 @@
# Starting from the following template and grep for "flutter" in the metadata
# directory to see other examples.
# Only choose one method between flutter submodule and srclib. If submodule method
# is chosen then please add flutter as a submodule in the source repo.
Builds:
- versionName: '1.0'
@ -27,10 +29,9 @@ Builds:
prebuild:
# Extract the flutter version and then checkout it in the flutter srclib
# Only needed when flutter srclib is used
- version=$(sed -n -E "s/.*flutter-version:\ '(.*)'/\1/p" .github/workflows/release.yml)
- pushd $$flutter$$
- git checkout -f $version
- popd
- flutterVersion=$(sed -n -E "s/.*flutter-version:\ '(.*)'/\1/p" .github/workflows/release.yml)
- '[[ $flutterVersion ]] || exit 1'
- git -C $$flutter$$ checkout -f $flutterVersion
# Change pub cache location so that the dart packages are scanned by the scanner
- export PUB_CACHE=$(pwd)/.pub-cache
- .flutter/bin/flutter config --no-analytics