Browse Source

tool: Cleanup building app

pull/379/head
jld3103 1 year ago
parent
commit
a3cf8011d4
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      .github/workflows/publish.yaml
  2. 8
      tool/build-app.sh
  3. 4
      tool/build/linux.sh

2
.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:

8
tool/build-neon.sh → 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
fi

4
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[*]}
flutter build linux ${BUILD_ARGS[*]}

Loading…
Cancel
Save