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

Enable publishing any tag name with the install command #105

Merged
merged 3 commits into from
Aug 23, 2023

Conversation

misenhower
Copy link
Contributor

@misenhower misenhower commented Aug 10, 2023

This PR adds a new ->publish($tag) method on the install command that enables you to publish arbitrary tag names. For instance, we might use ->publish('nova') to publish Nova resources from our package.

This way, we don't need to add an individual method for each possible tag name. I've also replaced all the individual $shouldPublish*** properties with the new $publishes array.

Let me know what you think. Thanks!!

@misenhower misenhower changed the title Enable publishing any tag name Enable publishing any tag name with the install command Aug 10, 2023
Copy link
Member

@freekmurze freekmurze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems nice, thanks!

@@ -117,32 +88,31 @@ public function handle()
}
}

public function publishConfigFile(): self
public function publish(string $tag): self
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this function variadic, so people can pass multiple tags.

$this->publish('config', 'assets');

@misenhower
Copy link
Contributor Author

Hey, sorry for the delay. I just pushed a change for that. Let me know what you think!

@freekmurze freekmurze merged commit cc7c991 into spatie:main Aug 23, 2023
21 checks passed
@freekmurze
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