ArtifactUtils

ArtifactUtils.add_artifact!Method
function add_artifact!(
    artifacts_toml::String, name::String, tarball_url::String;
    clear=true,
    platform::Union{Platform,Nothing}=nothing,
    lazy::Bool=false,
    force::Bool=false
)

Downloads tarball from tarball_url, extracts it and adds it as an artifact with name name to the file artifacts_toml. If clear is true, the artifact itself is deleted afterwards. The rest of the keyword arguments are passed to Pkg.Artifacts.bind_artifact!.

From its docstring:

If platform is not nothing, this artifact is marked as platform-specific, and will be a multi-mapping. It is valid to bind multiple artifacts with the same name, but different platforms and hash'es within the same artifacts_toml. If force is set to true, this will overwrite a pre-existant mapping, otherwise an error is raised.

[...] If lazy is set to true, even if download information is available, this artifact will not be downloaded until it is accessed via the artifact"name" syntax, or ensure_artifact_installed() is called upon it.

source
ArtifactUtils.upload_all_to_gist!Method
upload_all_to_gist!(
    artifacts_toml::AbstractString;
    extension::AbstractString = ".tar.gz",
    private::Bool = true,
    append::Bool = false,
)

Upload all artifact entries in artifacts_toml without the .download.url property (by default) and then update artifacts_toml.

Keyword Arguments

  • extension: file extension for of artifact archive files
  • private: if true, upload the archives to a private gist
  • append: if true, upload the archives even if the download entries exist
source
ArtifactUtils.upload_to_gistFunction
upload_to_gist(
    artifact_id::SHA1,
    [tarball];
    private::Bool = true,
    honor_overrides = false,
    # Following options are aviailable only when `tarball` is not specified:
    name::AbstractString = "$artifact_id.tar.gz",
    extension::AbstractString = ".tar.gz",
) -> gist

Create an artifact archive at path tarball (or in a temporary location) and upload it to gist. The returned value gist can be passed to add_artifact!.

Extended help

Examples

using ArtifactUtils
add_artifact!("Artifact.toml", "name", upload_to_gist(artifact_from_directory("source")))

creates an artifact from files in the "source" directory, upload it to gist, and then add it to "Artifact.toml" with the name "name".

Keyword Arguments

  • private: if true, upload the archive to a private gist
  • name: name of the archive file, including file extension
  • extension: file extension of the tarball. It can be used for specifying the compression method.
  • honor_overrides: see Pkg.Artifacts.archive_artifact
source