azukaar/GuPM

OS Provider

Closed this issue · 1 comments

GuPM should have a special protocol os:// that switches provider based on the host os.
The default provider to switch to will be added to the configuraiton file of gupm.

{
 "defaultProvider": "os",
  "osProviders" : {
    "windows": "chocolatey",
    "darwin": "brew",
    "linux": "flathub",
  }
}

whenever you will use os:// the proper package manager will be chosen.

g i os://mysql
g i mysql

For repo, add subfolder system:

{
  "linux/node": "0.0.1",
  "windows/node": "0.0.1",
  "mac/node": "0.0.1",
}

when installing, in http-provider check if subfolder is OS and replace by the os name.

g i https://azukaar.github.io/GuPM-official/repo:OS/provider-npm

when publishing,

g publish -- main repo

g publish mac -- sub repo mac/

sub-repo are not limited to OSes

g publish java
g i https://azukaar.github.io/some-repo-yo/repo:java/my-json-lib
g i https://azukaar.github.io/some-repo-yo/repo:node/my-json-lib

Done so far:

  • config file for os providers
  • switch providers when using os://
  • config for default provider
  • switch provider when using OS in http-provider
  • repo to support subfolders