Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete documentation #78

Closed
ollyde opened this issue Jun 8, 2022 · 10 comments
Closed

Incomplete documentation #78

ollyde opened this issue Jun 8, 2022 · 10 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@ollyde
Copy link

ollyde commented Jun 8, 2022

Using the default example provided here
https://distributor.leanflutter.org/docs/publishers/appstore

Exception: Missing/incomplete `distribute_options.yaml` file.
#0      FlutterDistributor.release (package:flutter_distributor/src/flutter_distributor.dart:289:7)
#1      CommandRelease.run (file:///Users/oliverdixon/.pub-cache/hosted/pub.dartlang.org/flutter_distributor-0.2.2/bin/command_release.dart:33:23)
#2      CommandRunner.runCommand (package:args/command_runner.dart:209:27)
#3      main (file:///Users/oliverdixon/.pub-cache/hosted/pub.dartlang.org/flutter_distributor-0.2.2/bin/main.dart:38:16)

Also, there is no example of ExportOptions.plist?

@lijy91
Copy link
Member

lijy91 commented Jun 8, 2022

You need to create the distribute_options.yaml file in the project root directory

@ollyde
Copy link
Author

ollyde commented Jun 8, 2022

@lijy91 yes I have that. I have an existing version working with MacOS but it throws this error all the time for iOS.

@lijy91
Copy link
Member

lijy91 commented Jun 8, 2022

Can you provide your distribute_options file?

@ollyde
Copy link
Author

ollyde commented Jun 8, 2022

output: dist/
releases:
  - name: prod
    jobs:
      - name: release-macos
        package:
          platform: macos
          target: zip
          build_args:
            dart-define:
              APP_ENV: prod
      # See full documentation: https://distributor.leanflutter.org/configuration/makers/exe
      - name: release-windows
        package:
          platform: windows
          target: msix
          build_args:
            dart-define:
              APP_ENV: prod
      - name: release-ios
        jobs:
          - name: release-ios
            package:
              platform: ios
              target: ipa
              build_args:
                target: lib/main.dart
                export-options-plist: ios/ExportOptions.plist
            publish:
              target: appstore

Run with command flutter_distributor release --name prod --jobs release-ios

Getting a new error
type 'Null' is not a subtype of type 'Map<String, dynamic>'

ExportOptions.plist looks like so

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>method</key>
	<string>app-store</string>
	<key>teamID</key>
	<string>J33N27XXX</string>
	<key>uploadBitcode</key>
	<true/>
	<key>compileBitcode</key>
	<true/>
	<key>uploadSymbols</key>
	<true/>
	<key>signingStyle</key>
	<string>manual</string>
	<key>signingCertificate</key>
	<string>iOS Distribution</string>
	<key>provisioningProfiles</key>
	<dict>
		<key>com.polydelic.testapp</key>
		<string>App Release</string>
	</dict>
</dict>
</plist>

@cybrox
Copy link
Contributor

cybrox commented Feb 14, 2023

@ollyde is this still an issue for you or did you find a solution?

I've worked on improving docs/checks for this package on a command-line level.
I'd work on the config file based issues next when I find time.
If this is still relevant to you, I could keep an eye on it while I'm at it.

@ollyde
Copy link
Author

ollyde commented Feb 14, 2023

@cybrox i switched back to fastlane but I’ve got a task to revise this library as I don’t like fastlane and using a lib would be way better.

@cybrox
Copy link
Contributor

cybrox commented Feb 14, 2023

Thanks for the feedback @ollyde!

I'll use this issue as an additional test case when working on it, then.

If you have to re-visit this before I get around to PR the changes... I finally switched our app over from fastlane last week, this is the config I'm using:

output: dist/

releases:
  - name: ios
    jobs:
      - name: ios-production
        package:
          platform: ios
          target: ipa
          build_args:
            export-options-plist: ./ios/Runner/Ipa-Export-Prod.plist
            flavor: prod  # only needed when using flavors
            dart-define:  # "
              ENV: prod   # "
        publish:
          target: appstore

@lijy91 lijy91 self-assigned this Mar 10, 2023
@lijy91 lijy91 added the documentation Improvements or additions to documentation label Mar 10, 2023 — with Volta.net
@poka-IT
Copy link

poka-IT commented Mar 24, 2024

Don't understand why this simple config works locally on my PC:

output: dist/

releases:
  - name: release
    jobs:
      - name: linux-deb
        package:
          platform: linux
          target: deb

But throw an error in gitlab CI using ghcr.io/cirruslabs/flutter:stable docker image:

$ flutter --version
Flutter 3.19.4 • channel [user-branch] • unknown source
Framework • revision 68bfaea224 (3 days ago) • 2024-03-20 15:36:31 -0700
Engine • revision a5c24f538d
Tools • Dart 3.3.2 • DevTools 2.31.1
$ ls -la
total 124
drwxrwxrwx 15 root root  4096 Mar 24 02:25 .
drwxrwxrwx  4 root root  4096 Mar 24 01:26 ..
-rw-rw-rw-  1 root root    46 Mar 24 01:26 analysis_options.yaml
drwxrwxrwx  4 root root  4096 Mar 24 02:10 android
drwxrwxrwx  2 root root  4096 Mar 24 01:26 assets
drwxrwxrwx  2 root root  4096 Mar 24 01:26 config
-rw-rw-rw-  1 root root   249 Mar 24 02:25 distribute_options.yaml
drwxrwxrwx  6 root root  4096 Mar 24 02:25 .git
-rw-rw-rw-  1 root root   711 Mar 24 01:26 .gitignore
-rw-rw-rw-  1 root root  2026 Mar 24 02:22 .gitlab-ci.yml
drwxrwxrwx  7 root root  4096 Mar 24 01:26 ios
drwxrwxrwx  8 root root  4096 Mar 24 01:26 lib
drwxrwxrwx  4 root root  4096 Mar 24 01:26 linux
drwxrwxrwx  7 root root  4096 Mar 24 01:26 macos
-rw-rw-rw-  1 root root  1706 Mar 24 01:26 .metadata
-rw-rw-rw-  1 root root 34778 Mar 24 02:10 pubspec.lock
-rw-rw-rw-  1 root root  1030 Mar 24 01:26 pubspec.yaml
-rw-rw-rw-  1 root root    33 Mar 24 01:26 README.md
drwxrwxrwx  2 root root  4096 Mar 24 01:26 scripts
drwxrwxrwx  3 root root  4096 Mar 24 01:26 snap
drwxrwxrwx  2 root root  4096 Mar 24 01:26 .vscode
drwxrwxrwx  3 root root  4096 Mar 24 01:26 web
drwxrwxrwx  4 root root  4096 Mar 24 01:26 windows
$ cat distribute_options.yaml
output: dist/

releases:
  - name: release
    jobs:
      - name: linux-deb
        package:
          platform: linux
          target: deb

$ flutter_distributor release --name $CI_COMMIT_TAG
RELEASE FAILED in 0s
Exception: Missing/incomplete `distribute_options.yaml` file.
#0      FlutterDistributor.release (package:flutter_distributor/src/flutter_distributor.dart:297:9)
#1      CommandRelease.run (file:///root/.pub-cache/hosted/pub.dev/flutter_distributor-0.3.7/bin/command_release.dart:69:24)
#2      CommandRunner.runCommand (package:args/command_runner.dart:212:27)
#3      main (file:///root/.pub-cache/hosted/pub.dev/flutter_distributor-0.3.7/bin/main.dart:47:17)
<asynchronous suspension>
$ mv dist/*/*.deb "dist/gazelle-${CI_COMMIT_TAG}.deb"
mv: cannot stat 'dist/*/*.deb': No such file or directory
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

@lijy91
Copy link
Member

lijy91 commented Mar 24, 2024

@poka-IT It seems that the value of $CI-COMMIT-TAG is not release

@lijy91 lijy91 closed this as completed Mar 24, 2024
@poka-IT
Copy link

poka-IT commented Mar 24, 2024

Yes, it was really stupid. Thank you for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants