Publishing a simple executable: problem with the upstream-url

The default case for publishing currently is:

from the repository that defines a package (lets take your scmpuff as an example)

flox publish -A scmpuff

will detect your current directory as a git repository (therefore defaulting --upstream-url to your origin remote.
The upstream-url is part of the published metadata to allow rebuilding of the published package from source.

--publish-to defines where these metadata files will be stored (since you need to access them somehow after all).
Normally this should point to your floxpkgs repository
flox will guess the repository from your published repositories origin url:

github.com/etorreborre/scmpuff
                               v
github.com/etorreborre/floxpkgs 
                                            =======                   

So to come back to your question,

to publish scmpuff you only need to run flox publish in the scmpuff repo.
the --publish-to and --upstream-url are confiremend interactively in that case.

If a single command is what you need it would be

flox publish -A scmpuff --upstream-url git+ssh://git@github.com/etorreborre/scmpuff.git --publish-to   git+ssh://git@github.com/etorreborre/floxpkgs

As @tomberek said the API is still experimental and were trying to find a good way to specify defaults without long cli invocations and repetitive/error prone interactive entries, stay tuned :slight_smile:

1 Like