microsoft / msstore-cli

Microsoft Store CLI
MIT License
72 stars 7 forks source link

Msstore CLI assumes Flutter project when attempting to init with pubspec.yaml file #27

Closed AnalogJ closed 4 months ago

AnalogJ commented 4 months ago

Hi!

I'm attempting to publish a pre-generated msix file

I'm calling msstore init . with the following pubspec.yaml file:

msix_config:
  display_name: Fasten Health
  publisher_display_name: Fasten Health, Inc
  identity_name: FastenHealthInc.FastenHealth
  msix_version: 1.0.8.0
  publisher: CN=94E2XXXX-XXXX-XXXX-XXXX-XXXXXXXXB278
  msstore_appId: 9PLXXXXXXXXP
  store: true

which results in the following error:

Ok! Found your apps!
This seems to be a Flutter project.
Let's set it up for you!

'flutter pub get' failed

I haven't even been able to run my publish command: msstore publish -v fasten_amd64.msix

azchohfi commented 4 months ago

Is this only a dart project, or is it a Flutter project?

If its only Flutter, the Flutter's official documentation should have all you need: https://docs.flutter.dev/deployment/windows#github-actions-cicd

The CLI doesn't support Dart projects that are not Flutter projects.

If you already have the msstore_appId in your msix_config section, there should be no need to run the init command. Not sure why you got a 'flutter pub get' failed, but the init should not be needed. The package command should build and package your MSIX, and the publish command will get the MSIX and publish it to partner center. You just need to run package and publish in your CI, and you don't need to point to where the MSIX is. You can (with the inputDirectory option), but you don't need to (it will try to find it based on the project type).

I just noticed that the package command is broken on newer version of Flutter since they changed the default build output folder (it now has the arch, x64 or arm64). Working on fix, so in the meantime just point to the specific MSIX using the inputDirectory option. Related to https://github.com/YehudaKremer/msix/issues/250

AnalogJ commented 4 months ago

closing, issue was fixed in https://github.com/microsoft/setup-msstore-cli/issues/171