ArtifactUtils
ArtifactUtils.add_artifact!
ArtifactUtils.artifact_from_directory
ArtifactUtils.upload_all_to_gist!
ArtifactUtils.upload_to_gist
ArtifactUtils.add_artifact!
— Methodfunction 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 notnothing
, 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 differentplatform
s andhash
'es within the sameartifacts_toml
. Ifforce
is set totrue
, this will overwrite a pre-existant mapping, otherwise an error is raised.[...] If
lazy
is set totrue
, even if download information is available, this artifact will not be downloaded until it is accessed via theartifact"name"
syntax, orensure_artifact_installed()
is called upon it.
ArtifactUtils.artifact_from_directory
— Methodartifact_from_directory(source; follow_symlinks = false) -> artifact_id::SHA1
Create an artifact from the source
directory and return the artifact_id
.
ArtifactUtils.upload_all_to_gist!
— Methodupload_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 filesprivate
: iftrue
, upload the archives to a private gistappend
: iftrue
, upload the archives even if thedownload
entries exist
ArtifactUtils.upload_to_gist
— Functionupload_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
: iftrue
, upload the archive to a private gistname
: name of the archive file, including file extensionextension
: file extension of the tarball. It can be used for specifying the compression method.honor_overrides
: seePkg.Artifacts.archive_artifact