Julia - package update notifications

I am developing a package that has been released, but every week or every few weeks new features are added to the base version.

What I would like to do is tell users that new features are available, such as

julia> using Package
 Note: new features are available:
         - feature 1
         - feature 2
       call Pkg.update("Package") to make these features available

Is there a standard / built-in way to do this? I would prefer not forcing users to install packages Requestsand LibCurlfor that sole function.

+4
source share
1 answer

There is a built-in command to download a file download. You can download the following three possible release numbers from GitHub:

for version in [v"0.4.1", v"0.5.0", v"1.0.0"]
    filename = download("https://github.com/JuliaFinance/Currencies.jl/releases/tag/v$version")
    data = readstring(filename)
    if data != """{"error":"Not Found"}"""
        println("Version v$version is available!")
        # this release was tagged on GitHub, notify user
    end
end

, , GitHub. , try... catch , .

+1

Source: https://habr.com/ru/post/1662264/


All Articles