Closed svenluijten closed 3 years ago
Oh, this is so needed.
I'm delaying this for a 1.x release. Working towards 1.0.0 now, which will just be the basic functionality. After that is out, I'll get working on adding some extra functionality, like this.
Idea to consider: allow us to auto-generate this in forge.json
using, for example, forge alias:generate
.
For servers that would call /api/v1/servers
and insert the associated server id/name pairs into forge.json
, and also /api/v1/servers/{serverId}/sites
for sites.
Consider having two alias sections: one that's customized by users and one that's auto-generated using forge defined id/name pairs. This way user defined aliases won't be overwritten and official id/name pairs will always work as we might forget our shorter or fancy aliases.
Initial work for this is done in 36a64ab75f4f4e8ae59ad5c21603998f0944fc91 and f9dd984b71754a5138cb239cae365b72050fd67a. Still needs tweaking, but I'm happy with the way I got this to work as it is!
@svenluijten if you want other people to contribute, please don't push directly to master.
its hard to update your own branches if you pushed something with errors ;)
You're totally right, I'll work on putting this in a seperate PR!
@svenluijten I have also submitted a PR which adds this (or at least some of it) functionality: #45
Closing because I am abandoning this package in favor of laravel/forge-cli
.
Something like
forge alias:site {siteId} {alias}
andforge alias:server {serverId} {alias}
should put the following JSON structure in the~/forge.json
file:So that instead of
{serverId}
or{siteId}
, we can use their aliases in commands. Eg: