From ac19033c73cd9778c66be33b4c0bb9cea7eb1d8e Mon Sep 17 00:00:00 2001 From: Dennis Loose Date: Thu, 7 Dec 2023 17:34:15 +0100 Subject: [PATCH] feat(snap): use melos in snapcraft.yaml this ensures all local package dependencies are correctly set up before building the binary --- snap/snapcraft.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 6f275876d..878179543 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -35,14 +35,13 @@ parts: source: . plugin: nil override-build: | - cd packages/app_center + set -eux + dart pub global activate melos # when building locally artifacts can pollute the container and cause builds to fail # this helps increase reliability for local builds - flutter clean - # work around pub get stack overflow # https://github.com/dart-lang/sdk/issues/51068#issuecomment-1396588253 - set +e - dart pub get - set -eux + dart pub global run melos clean + dart pub global run melos bootstrap + cd packages/app_center flutter build linux --release -v mkdir -p $CRAFT_PART_INSTALL/bin/ cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/