diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml index 1d8acce..852e248 100644 --- a/.github/workflows/create-github-release.yml +++ b/.github/workflows/create-github-release.yml @@ -29,7 +29,10 @@ jobs: fetch-depth: 0 submodules: recursive - - run: flutter/bin/flutter doctor -v + - name: Set FLUTTER_ROOT environment variable + run: echo "FLUTTER_ROOT=$(pwd)/flutter/bin" >> $GITHUB_ENV + + - run: $FLUTTER_ROOT/flutter doctor -v - name: Setup signing config uses: ./.github/actions/setup-android-signing-config diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 618158e..2676a06 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -38,7 +38,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 with: - submodules: true + fetch-depth: 0 + submodules: recursive + + - name: Set FLUTTER_ROOT environment variable + run: echo "FLUTTER_ROOT=$(pwd)/flutter/bin" >> $GITHUB_ENV + + - run: $FLUTTER_ROOT/flutter doctor -v - name: Setup signing config uses: ./.github/actions/setup-android-signing-config diff --git a/.github/workflows/release-deploy-play-store.yml b/.github/workflows/release-deploy-play-store.yml index fc98978..079d753 100644 --- a/.github/workflows/release-deploy-play-store.yml +++ b/.github/workflows/release-deploy-play-store.yml @@ -33,7 +33,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 with: - submodules: true + fetch-depth: 0 + submodules: recursive + + - name: Set FLUTTER_ROOT environment variable + run: echo "FLUTTER_ROOT=$(pwd)/flutter/bin" >> $GITHUB_ENV + + - run: $FLUTTER_ROOT/flutter doctor -v - name: Setup signing config uses: ./.github/actions/setup-android-signing-config diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index 88d2de3..78a7ce8 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -25,7 +25,7 @@ platform :android do |options| lane :publish_in_play_store do |options| release_status = (options[:is_draft] ? "draft" : "completed") track = (options[:track]) - sh "flutter/bin/flutter build appbundle -v" + sh "$FLUTTER_ROOT/flutter build appbundle -v" upload_to_play_store( track: track, release_status: release_status, @@ -47,8 +47,8 @@ platform :android do |options| desc "Builds apks and creates a new release on GitHub" lane :github do |options| - sh "flutter/bin/flutter build apk --split-per-abi --release" - sh "flutter/bin/flutter build apk --release" + sh "$FLUTTER_ROOT/flutter build apk --split-per-abi --release" + sh "$FLUTTER_ROOT/flutter build apk --release" set_github_release( repository_name: "astubenbord/paperless-mobile", api_token: ENV["GH_ACCESS_TOKEN"], diff --git a/scripts/install_dependencies_with_submodule.sh b/scripts/install_dependencies_with_submodule.sh index 35dadd9..402cf0c 100644 --- a/scripts/install_dependencies_with_submodule.sh +++ b/scripts/install_dependencies_with_submodule.sh @@ -8,17 +8,16 @@ readonly __script_dir pushd "$__script_dir/../" pushd packages/paperless_api -../../flutter/bin/flutter packages pub get -../../flutter/bin/dart run build_runner build --delete-conflicting-outputs +$FLUTTER_ROOT/flutter packages pub get +$FLUTTER_ROOT/dart run build_runner build --delete-conflicting-outputs popd pushd packages/mock_server -../../flutter/bin/flutter packages pub get +$FLUTTER_ROOT/flutter packages pub get popd -flutter/bin/flutter packages pub get -flutter/bin/flutter gen-l10n -flutter/bin/dart run build_runner build --delete-conflicting-outputs - +$FLUTTER_ROOT/flutter packages pub get +$FLUTTER_ROOT/dart run build_runner build --delete-conflicting-outputs +$FLUTTER_ROOT/flutter gen-l10n popd