DuckDuck v1.1.0 DuckDuck.Transform View Source
Describes a series of transformations to iteratively build an UploadCommand.
Link to this section Summary
Functions
Ask the user if they’re ok with the upload plan
Put the api token in the command if not already there
Put the owner in the command if not already there
Transform an argument list into a command
Put the path to the upload file in the command if not already present
Put the repo in the command if not already there
Put the tag in a command if not already there
Try uploading the tarball given the information in the command
Find the upload url and put it in the command
Link to this section Functions
accept?(DuckDuck.UploadCommand.t()) :: DuckDuck.UploadCommand.t()
Ask the user if they’re ok with the upload plan
api_token(DuckDuck.UploadCommand.t()) :: DuckDuck.UploadCommand.t() | {:error, String.t()}
Put the api token in the command if not already there.
owner(DuckDuck.UploadCommand.t()) :: DuckDuck.UploadCommand.t() | {:error, String.t()}
Put the owner in the command if not already there
Transform an argument list into a command
path(DuckDuck.UploadCommand.t()) :: DuckDuck.UploadCommand.t() | {:error, String.t()}
Put the path to the upload file in the command if not already present
repo(DuckDuck.UploadCommand.t()) :: DuckDuck.UploadCommand.t() | {:error, String.t()}
Put the repo in the command if not already there
tag(DuckDuck.UploadCommand.t()) :: DuckDuck.UploadCommand.t()
Put the tag in a command if not already there
upload(DuckDuck.UploadCommand.t()) :: IO.chardata()
Try uploading the tarball given the information in the command.
upload_url(DuckDuck.UploadCommand.t()) :: DuckDuck.UploadCommand.t() | {:error, String.t()}
Find the upload url and put it in the command.
For uploading assets, you need to ask GitHub where to put them through their API. Interestingly, you can’t upload assets to a tag. Only a release may have assets. So when you want to upload to a tag, you must also create the release from the tag. You can do this with a single API call.