Browse Source

Fix paths after packages refactoring

pull/253/head
jld3103 2 years ago
parent
commit
ffb8907f6f
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 16
      .github/workflows/publish.yaml
  2. 4
      tool/build-neon.sh
  3. 2
      tool/cloc.sh
  4. 8
      tool/generate-neon.sh

16
.github/workflows/publish.yaml

@ -61,11 +61,11 @@ jobs:
java-version: 11 java-version: 11
- name: Build - name: Build
run: cd packages/neon && flutter build apk --split-per-abi --build-number="${{ needs.setup.outputs.build_number }}" run: cd packages/app && flutter build apk --split-per-abi --build-number="${{ needs.setup.outputs.build_number }}"
- uses: ilharp/sign-android-release@v1 - uses: ilharp/sign-android-release@v1
name: Sign name: Sign
with: with:
releaseDir: packages/neon/build/app/outputs/flutter-apk releaseDir: packages/app/build/app/outputs/flutter-apk
signingKey: ${{ secrets.SIGNING_KEY }} signingKey: ${{ secrets.SIGNING_KEY }}
keyAlias: ${{ secrets.ALIAS }} keyAlias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
@ -74,17 +74,17 @@ jobs:
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: Android arm64-v8a name: Android arm64-v8a
path: packages/neon/build/app/outputs/flutter-apk/app-arm64-v8a-release-signed.apk path: packages/app/build/app/outputs/flutter-apk/app-arm64-v8a-release-signed.apk
if-no-files-found: error if-no-files-found: error
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: Android armeabi-v7a name: Android armeabi-v7a
path: packages/neon/build/app/outputs/flutter-apk/app-armeabi-v7a-release-signed.apk path: packages/app/build/app/outputs/flutter-apk/app-armeabi-v7a-release-signed.apk
if-no-files-found: error if-no-files-found: error
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: Android x86_64 name: Android x86_64
path: packages/neon/build/app/outputs/flutter-apk/app-x86_64-release-signed.apk path: packages/app/build/app/outputs/flutter-apk/app-x86_64-release-signed.apk
if-no-files-found: error if-no-files-found: error
linux_x86_64: linux_x86_64:
@ -114,12 +114,12 @@ jobs:
libappindicator3-dev libappindicator3-dev
- name: Build - name: Build
run: cd packages/neon && flutter build linux --build-number="${{ needs.setup.outputs.build_number }}" run: cd packages/app && flutter build linux --build-number="${{ needs.setup.outputs.build_number }}"
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: Linux x86_64 name: Linux x86_64
path: packages/neon/build/linux/x64/release/bundle/* path: packages/app/build/linux/x64/release/bundle/*
if-no-files-found: error if-no-files-found: error
# linux_arm64: # linux_arm64:
@ -152,5 +152,5 @@ jobs:
# - uses: actions/upload-artifact@v3 # - uses: actions/upload-artifact@v3
# with: # with:
# name: Linux arm64 # name: Linux arm64
# path: packages/neon/build/linux/arm64/release/bundle/* # path: packages/app/build/linux/arm64/release/bundle/*
# if-no-files-found: error # if-no-files-found: error

4
tool/build-neon.sh

@ -45,11 +45,11 @@ if [[ "$target" == "linux/arm64" ]] || [[ "$target" == "linux/amd64" ]]; then
./tool/build ./tool/build
paths=() paths=()
for path in packages/*; do for path in packages/{app,file_icons,nextcloud,settings,sort_box} packages/neon/*; do
paths+=("$path/lib" "$path/pubspec.yaml") paths+=("$path/lib" "$path/pubspec.yaml")
done done
run_args=() run_args=()
for path in ${paths[*]} "packages/file_icons/fonts" packages/neon{,_files,_news,_notes,_notifications}/assets "packages/app/build" "packages/app/linux"; do for path in ${paths[*]} "packages/file_icons/fonts" packages/neon/neon{,_files,_news,_notes,_notifications}/assets "packages/app/build" "packages/app/linux"; do
run_args+=(-v "$(pwd)/$path:/src/$path") run_args+=(-v "$(pwd)/$path:/src/$path")
done done
mkdir -p "packages/app/build" mkdir -p "packages/app/build"

2
tool/cloc.sh

@ -4,6 +4,6 @@ cd "$(dirname "$0")/.."
cloc \ cloc \
--fullpath \ --fullpath \
--not-match-d="(./external|./specs/templates|./packages/.*/.idea|./packages/.*/build|./packages/.*/coverage|./packages/.*/.dart_tool|./packages/neon/linux/flutter/ephemeral|./packages/nextcloud/doc)" \ --not-match-d="(./external|./specs/templates|./packages/.*/.idea|./packages/.*/build|./packages/.*/coverage|./packages/.*/.dart_tool|./packages/app/linux/flutter/ephemeral|./packages/nextcloud/doc)" \
--exclude-ext="g.dart" --exclude-ext="openapi.dart" \ --exclude-ext="g.dart" --exclude-ext="openapi.dart" \
. .

8
tool/generate-neon.sh

@ -26,7 +26,7 @@ function export_mipmap_icon_all() {
function copy_nextcloud_app_svg() { function copy_nextcloud_app_svg() {
id="$1" id="$1"
path="$2" path="$2"
target="packages/neon_$id/assets/app.svg" target="packages/neon/neon_$id/assets/app.svg"
if [ -f "$path/img/app.svg" ]; then if [ -f "$path/img/app.svg" ]; then
cp "$path/img/app.svg" "$target" cp "$path/img/app.svg" "$target"
elif [ -f "$path/img/$id.svg" ]; then elif [ -f "$path/img/$id.svg" ]; then
@ -47,7 +47,7 @@ copy_nextcloud_app_svg notes external/nextcloud-notes
copy_nextcloud_app_svg notifications external/nextcloud-notifications copy_nextcloud_app_svg notifications external/nextcloud-notifications
( (
cd packages/neon cd packages/neon/neon
# Nextcloud logo # Nextcloud logo
wget https://raw.githubusercontent.com/nextcloud/promo/master/nextcloud-logo-inverted.svg -O assets/logo_nextcloud.svg wget https://raw.githubusercontent.com/nextcloud/promo/master/nextcloud-logo-inverted.svg -O assets/logo_nextcloud.svg
@ -69,9 +69,9 @@ copy_nextcloud_app_svg notifications external/nextcloud-notifications
exiftool -overwrite_original -all= img/splash_icon_android_12.png # To remove timestamps exiftool -overwrite_original -all= img/splash_icon_android_12.png # To remove timestamps
# Android launcher icons # Android launcher icons
export_mipmap_icon_all "../neon/assets/logo_neon.svg" "ic_launcher" & export_mipmap_icon_all "../neon/neon/assets/logo_neon.svg" "ic_launcher" &
for id in files news notes notifications; do for id in files news notes notifications; do
export_mipmap_icon_all "../neon_$id/assets/app.svg" "app_$id" & export_mipmap_icon_all "../neon/neon_$id/assets/app.svg" "app_$id" &
done done
wait wait

Loading…
Cancel
Save