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

Update blueprint custom-post to use literal:directory i #91

Closed
Tracked by #92
bph opened this issue Jan 29, 2025 · 0 comments · Fixed by #122
Closed
Tracked by #92

Update blueprint custom-post to use literal:directory i #91

bph opened this issue Jan 29, 2025 · 0 comments · Fixed by #122
Assignees

Comments

@bph
Copy link
Collaborator

bph commented Jan 29, 2025

The current relevat steps:

{
	"step": "mkdir",
	"path": "/wordpress/wp-content/plugins/books"
		},
		{
			"step": "writeFile",
			"path": "/wordpress/wp-content/plugins/books/books.php",
			"data": {
				"resource": "url",
				"url": "https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/custom-post/books.php"
			}
		},

Become something like this:

{
  "step": "installPlugin",
  "pluginData": {
    "resource": "literal:directory",
    "name": "books",
    "files": {
      "books.php": {
        "resource": "url",
        "url": "https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/custom-post/books.php"
      }
    }
  },
  "options": {
    "activate": true
  }
}

That actually assumes that installPlugin step handles both creating the directory and writing the file in one go.

If that assumption is wrong, here is the alternative:

{
  "step": "writeFiles",
  "writeToPath": "/wordpress/wp-content/plugins/books",
  "filesTree": {
    "name": "books",
    "files": {
      "books.php": {
        "resource": "url",
        "url": "https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/custom-post/books.php"
      }
    }
  }
},
{
  "step": "activatePlugin",
  "pluginPath": "books/books.php"
}

@adamziel @brandonpayton any thoughts here?

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

Successfully merging a pull request may close this issue.

1 participant