Open abdheshnayak opened 6 months ago
This PR solves issue https://github.com/jpillora/installer/issues/42 .
Thanks though how does this differ from ‘as’?
as
handles the binary name in the local system. It doesn't have any relationship with the release name. Downloading the same file doesn't matter what value you are providing through as
.
But the above changes will handle which binary should be downloaded and, if one repository consists of more than one binary then we can specify which binary needs to download.
For example in the case of monorepo, one repository can distribute two binaries for example,
Repo Name: foobar
Releasing: fb-client, fb-server
It might be possible to distribute both within a single archive, but users may not need both and we are going to add junk to their system which will be never used in future.
So to provide specific access users can download fb-client by bin=fb-client and similarly fb-server by bin=fb-server.
Next combination that user can specify:
action: download fb-server as fbs
Query: bin=fb-server&as=fbs
action: download fb-client as fbc
Query: bin=fb-client&as=fbc
In the above both scenarios the repository is the same but distributing two binaries client and server through release.
Oh i see, it selects a binary
Can we rename it to Select?
On Tue, 27 Feb 2024 at 11:49 AM Abdhesh Nayak @.***> wrote:
as handles the binary name in the local system. It doesn't have any relationship with the release name. Downloading the same file doesn't matter what value you are providing through as.
But the above changes will handle which binary should be downloaded and, if one repository consists of more than one binary then we can specify which binary needs to download.
For example in the case of monorepo, one repository can distribute two binaries for example,
Repo Name: foobar
Releasing: fb-client, fb-server
It might be possible to distribute both within a single archive, but users may not need both and we are going to add junk to their system which will be never used in future.
So to provide specific access users can download fb-client by bin=fb-client and similarly fb-server by bin=fb-server.
Next combination that user can specify: action: download fb-server as fbs Query: bin=fb-server&as=fbs
action: download fb-client as fbc Query: bin=fb-client as fbc
In the above both scenarios the repository is the same but distributing two binaries client and server through release.
— Reply to this email directly, view it on GitHub https://github.com/jpillora/installer/pull/45#issuecomment-1965593909, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X45CN7WZWEGUT4K3CADYVUURTAVCNFSM6AAAAABD2RUQQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRVGU4TGOJQHE . You are receiving this because you commented.Message ID: @.***>
Changes made accordingly, please check and review.
Added Support for Binary Name via Query Params
Issue:
When a repository name differs from its binary release name, it could previously not be handled correctly. For example, if the repository name is
foobar
but the binary name isfb
.Solution:
To address this issue, the parameter
?bin=
has been introduced. This allows for the specification of the binary name directly in the query parameters.Behavior of Changes:
These changes do not affect any previous functionality. The addition of the
bin
parameter serves as an enhancement, allowing users who need to specify a different binary name to do so. This ensures compatibility and flexibility for various repository and binary naming conventions.