build: Set version in override-pull

This commit is contained in:
krille-chan 2025-08-02 11:01:12 +02:00
parent 13f67544e0
commit f7e46b391e
No known key found for this signature in database

View file

@ -78,12 +78,12 @@ parts:
after: [flutter-git]
plugin: nil
source: .
override-pull: |
craftctl default
craftctl set version="$(yq e '.version' pubspec.yaml | sed 's/\(.*\)+.*/\1/')"
override-build: |
# Workaround for Flutter build error:
rm -rf build
craftctl set version="$(yq e '.version' pubspec.yaml | sed 's/\(.*\)+.*/\1/')"
flutter build linux --release -v
mkdir -p $CRAFT_PART_INSTALL/bin/
cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/