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

[7.x] Only create the blueprints when not running on console #581

Conversation

BobWez98
Copy link
Contributor

@BobWez98 BobWez98 commented Aug 8, 2024

We have our own package that uses the runway add-on. We have defined default Runway resources in this module. As we're updating our module to be compatible with the latest version of Runway we've come across a problem.

We want to define the blueprints in our module, thus we had the config file. In the latest Runway version, blueprints live in .yaml files under the resources/blueprints/vendor/runway directory. We'd like to use the php artisan vendor:publish command to copy our module defined blueprints to the project. Sadly when running php artisan vendor:publish the Runway service provider is registered first and creates empty blueprints. This causes the default blueprints to be already present, and thus can't ours be published.

Our blueprint in the module:
brand.yaml

tabs:
  main:
    sections:
      -
        fields:
          -
            handle: option_id
            field:
              type: integer
          -
            handle: sort_order
            field:
              type: integer
          -
            handle: value_admin
            field:
              type: text
          -
            handle: value_store
            field:
              type: text

Blueprint after publishing (no error occured):

tabs:
  main:
    sections:
      -
        fields: {}

Let me know if you need any more information.

@BobWez98 BobWez98 changed the title Only create the blueprints when not running on console [7.x] Only create the blueprints when not running on console Aug 8, 2024
@duncanmcclean duncanmcclean merged commit 6e75c94 into statamic-rad-pack:7.x Aug 9, 2024
6 checks passed
Copy link

github-actions bot commented Aug 9, 2024

Released as part of v7.7.5.

@duncanmcclean
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants