ionic-team / trapeze

The mobile project configuration toolbox. Manage native iOS, Android, Ionic/Capacitor, React Native, and Flutter apps through a simple YAML format.
https://trapeze.dev
Other
319 stars 39 forks source link

Unable to run for web platform on Appflow #217

Open troygilbert opened 4 months ago

troygilbert commented 4 months ago

The default Trapeze script doesn't run if the CI_PLATFORM is 'web'. I removed this conditional logic because I want to run some JSON patching even for Javascript builds. But then it doesn't work if I pass in the platform "web" to the trapeze command-line. So, I removed that flag. But now it appears trapeze attempts to use Gradle on iOS builds, which at least in Appflow is not present. What's the correct way to set this up?

My current Trapeze config yaml (appflow.yml):

vars:
  CI_BUILD_NUMBER:
    default: 1

platforms:
  ios:
    buildNumber: $CI_BUILD_NUMBER
  android:
    versionCode: $CI_BUILD_NUMBER
  project:
    json:
      - file: src/metadata.json
        set:
          liveBuild: $CI_BUILD_NUMBER

And my package.json build script:

"appflow:build": "CI_BUILD_NUMBER=$(($CI_BUILD_NUMBER + 1143)); npx trapeze run appflow.yml -y && npm run build",