From a3cf8011d4ea903eff58990103bdd6501f269ffe Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 9 Jun 2023 01:18:52 +0200 Subject: [PATCH] tool: Cleanup building app --- .github/workflows/publish.yaml | 2 +- tool/{build-neon.sh => build-app.sh} | 8 ++------ tool/build/linux.sh | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) rename tool/{build-neon.sh => build-app.sh} (87%) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 894a667d..5d0a64b8 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -147,7 +147,7 @@ jobs: # - name: Build # env: # FLUTTER_VERSION: ${{ needs.setup.outputs.flutter_version }} -# run: ./tool/build-neon.sh linux/arm64 --build-number="${{ needs.setup.outputs.build_number }}" +# run: ./tool/build-app.sh linux/arm64 --build-number="${{ needs.setup.outputs.build_number }}" # # - uses: actions/upload-artifact@v3 # with: diff --git a/tool/build-neon.sh b/tool/build-app.sh similarity index 87% rename from tool/build-neon.sh rename to tool/build-app.sh index 2710bda6..94a75f53 100755 --- a/tool/build-neon.sh +++ b/tool/build-app.sh @@ -44,12 +44,8 @@ if [[ "$target" == "linux/arm64" ]] || [[ "$target" == "linux/amd64" ]]; then -f "tool/build/Dockerfile.$os" \ ./tool/build - paths=() - for path in packages/{app,file_icons,nextcloud,settings,sort_box} packages/neon/*; do - paths+=("$path/lib" "$path/pubspec.yaml") - done run_args=() - for path in ${paths[*]} "packages/file_icons/fonts" packages/neon/neon{,_files,_news,_notes,_notifications}/assets "packages/app/build" "packages/app/linux"; do + for path in packages/{app,file_icons,nextcloud,settings,sort_box}/{lib,pubspec.yaml} packages/neon/*/{assets,lib,pubspec.yaml,pubspec_overrides.yaml} packages/file_icons/fonts packages/nextcloud/pubspec_overrides.yaml packages/app/{pubspec_overrides.yaml,assets,build,linux}; do run_args+=(-v "$(pwd)/$path:/src/$path") done mkdir -p "packages/app/build" @@ -72,4 +68,4 @@ if [[ "$target" == "linux/arm64" ]] || [[ "$target" == "linux/amd64" ]]; then trap cleanup EXIT docker logs -f "$container_id" -fi \ No newline at end of file +fi diff --git a/tool/build/linux.sh b/tool/build/linux.sh index 2ba9e731..8e0eb62c 100755 --- a/tool/build/linux.sh +++ b/tool/build/linux.sh @@ -2,7 +2,7 @@ set -euxo pipefail if [ ! -f /.dockerenv ]; then - echo "This script needs to run in a specific docker container, use the build-neon.sh script" + echo "This script needs to run in a specific docker container, use the build-app.sh script" exit 1 fi @@ -13,4 +13,4 @@ trap cleanup EXIT cd /src/packages/app # shellcheck disable=SC2086 -flutter build linux ${BUILD_ARGS[*]} \ No newline at end of file +flutter build linux ${BUILD_ARGS[*]}