emavgl / oinkoin

Oinkoin is a flutter app for helping you managing your expenses. No internet required.
GNU General Public License v3.0
139 stars 8 forks source link

F-Droid can't build #43

Closed licaon-kter closed 3 months ago

licaon-kter commented 9 months ago

1.0.30 still has an old flutter: https://github.com/emavgl/oinkoin/tree/1.0.30/submodules

1.0.31 same: https://github.com/emavgl/oinkoin/tree/1.0.31/submodules

1.0.31 has no bumped version info either: https://github.com/emavgl/oinkoin/blob/1.0.31/pubspec.yaml#L14

/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/d8b690cddab43313eb28f0252a27afbb5eb91688

emavgl commented 9 months ago

Hi, thanks for the PR. Will revert to the older version soon.

Can you link me to the problem to the build?

/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/d8b690cddab43313eb28f0252a27afbb5eb91688 - that's another problem. At the moment the tag is set, then the Github actions runs and commit the new version bump on the repo. Is this a problem with F-droid? I'll figure out a solution otherwise.

licaon-kter commented 9 months ago

Ah, forgot the link, here: https://gitlab.com/fdroid/fdroiddata/-/jobs/5772369823#L1122

emavgl commented 9 months ago

Hi @licaon-kter,

It should be fixed. I upgraded the dart sdk version. However, I have tried running it locally at failed with

 ERROR: Unused scanignore path: submodules/flutter/packages/flutter_tools/gradle/flutter.gradle

Not sure if it is a problem with my local setup.

I am using this configuration

Builds:
  - versionName: 1.0.31
    versionCode: 8025
    commit: 121896fcd65f162b33977db8db100a95d19bcf1b
    submodules: true
    output: build/app/outputs/flutter-apk/app-arm64-v8a-fdroid-release.apk
    rm:
      - ios
      - macos
    prebuild:
      - export PUB_CACHE=$(pwd)/.pub-cache
      - submodules/flutter/bin/flutter config --no-analytics
      - submodules/flutter/bin/flutter pub get
    scanignore:
      - submodules/flutter/packages/flutter_tools/gradle/flutter.gradle
      - submodules/flutter/bin/cache
    scandelete:
      - submodules/flutter
      - .pub-cache
    build:
      - export PUB_CACHE=$(pwd)/.pub-cache
      - submodules/flutter/bin/flutter build apk --release --flavor fdroid --split-per-abi
        --target-platform="android-arm64"

AutoUpdateMode: Version
UpdateCheckMode: Tags
VercodeOperation:
  - 2 * 1000 + %c
UpdateCheckData: pubspec.yaml|version:\s.+\+(\d+)|.|version:\s(.+)\+
CurrentVersion: 1.0.31
CurrentVersionCode: 8025
licaon-kter commented 9 months ago

Yeah, that line needs no be removed ;)

emavgl commented 9 months ago

Ok thanks :)

~I may be wrong, but I don't find anymore my package on master.~

Should I do another PR re-adding the package with the new configuration with the removed line, changing the commit hash, version to reflect the newest version like in the example above?

licaon-kter commented 9 months ago

I've tested locally and it builds fine

fyi https://gitlab.com/fdroid/fdroiddata/-/commit/3f4fe77030bb0a3d262616ee47e2f073853f6769 :)

emavgl commented 9 months ago

Thank you so much :)

licaon-kter commented 4 months ago

failed again: https://gitlab.com/fdroid/fdroiddata/-/jobs/6803748575#L988 ...as the Flutter submodule is 8 months old :(

The whole point of the submodule is that it's part of the code here and that it's always up to date because you 'dog food' it and you use it in your CI workflow https://github.com/emavgl/oinkoin/blob/1.0.60/.github/workflows/on-release.yml#L31 hence it can't never be wrong, right? 😄

/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/a79a624576c253bc785f5a9f484cc7a7a7e8f75c

emavgl commented 4 months ago

Hi, thanks again. I have updated the submodule in 1.0.61

How can I verify that it is solved now?

It is definitely a good idea to change my CI to use the submodule instead of fetching the stable version using the GitHub actions.

licaon-kter commented 4 months ago

testing now, brb

licaon-kter commented 4 months ago

builds fine, hence https://gitlab.com/fdroid/fdroiddata/-/commit/b222024c0383ded6f211273a7f56506402bd765b

licaon-kter commented 4 months ago

still old flutter :( https://gitlab.com/fdroid/fdroiddata/-/jobs/6996810011

Can you add the submodule to your build scripts so you are forced to update it? that's the whole point of it

/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/2636c009b15853a6887592b0a27448becef405d1

emavgl commented 4 months ago

Hi @licaon-kter,

I am very sorry you had to reopen this issue again. With F-Droid it is my first time using these submodules, I thought I had solved by specifying to the .gitmodules file the branch stable of f-droid, but apparently I should do the checkout of the submodule and push-it explicitly.

I will leave it open and spend some time to use flutter from the submodules also in my scripts.

Thanks for the patience.

On another topic: is it possible to specify two outputs in the f-droid manifest file? I have been asked to push the apk for the app also for another architecture https://github.com/emavgl/oinkoin/issues/120 - I have no idea if this is possible. Thanks in advance for your help.

emavgl commented 3 months ago

Hi @licaon-kter

It took more time than expected. In the last commits, I have made the change and the Github actions should now update automatically and use the flutter version from submodules for the build.