Skip to content

tkf/ArtifactUtils.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArtifactUtils

Stable Dev Build Status Coverage pkgeval

Provides the function add_artifact!, which makes it easy for Julia projects to ship their own tarballs as Artifacts.

Example

This will download the JuliaMono font from GitHub as a tarball and create a corresponding Artifacts.toml file in the current directory. It allows any Julia code in that directory to access these files with the artifact"..." string macro.

julia> using ArtifactUtils, Artifacts # Artifacts provides the artifact string macro

julia> add_artifact!(
           "Artifacts.toml",
           "JuliaMono",
           "https://github.com/cormullion/juliamono/releases/download/v0.030/JuliaMono.tar.gz",
           force=true,
       )
SHA1("6c460cf2eccecd24499618112adbbe7e403fa1ee")

julia> import Pkg; Pkg.instantiate() # to install the artifact
  Downloaded artifact: JuliaMono
  Downloaded artifact: JuliaMono

julia> artifact"JuliaMono"
"/home/simeon/.julia/artifacts/6c460cf2eccecd24499618112adbbe7e403fa1ee"

julia> run(`ls $ans`);
JuliaMono-Black.ttf	JuliaMono-Bold.ttf	 JuliaMono-Light.ttf	JuliaMono-RegularLatin.ttf  LICENSE
JuliaMono-BoldLatin.ttf  JuliaMono-ExtraBold.ttf  JuliaMono-Medium.ttf	JuliaMono-Regular.ttf

About

A tool for package developers for working with artifacts.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • Julia 100.0%