Skip to content

Commit 503ac84

Browse files
committed
Allow specifying update level in tools/update_notebook_pacakges.jl
1 parent 2817834 commit 503ac84

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tools/update_notebook_packages.jl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
if !isdir("pluto-deployment-environment")
1+
if !isdir("pluto-deployment-environment") || length(ARGS) != 1
22
error("""
33
Run me from the root of the repository directory, using:
44
5-
julia tools/generate_book.jl
5+
julia tools/update_notebook_packages.jl <level>
6+
7+
Where <level> is one of: PATCH, MINOR, MAJOR
68
""")
79
end
810

911
if VERSION < v"1.6.0-aaa"
1012
@error "Our website needs to be generated with Julia 1.6. Go to julialang.org/downloads to install it."
1113
end
1214

15+
if length(ARGS) != 1
16+
@error "Usage: julia tools/generate_book.jl <path to PlutoPages.jl>"
17+
end
18+
1319
import Pkg
1420
Pkg.activate("./pluto-deployment-environment")
1521
Pkg.instantiate()
@@ -25,7 +31,9 @@ end
2531

2632
all_notebooks = filter(Pluto.is_pluto_notebook, all_files_recursive)
2733

34+
level = getfield(Pkg, Symbol("UPLEVEL_$(ARGS[1])"))
35+
2836
for n in all_notebooks
2937
@info "Updating" n
30-
Pluto.update_notebook_environment(n)
38+
Pluto.update_notebook_environment(n; backup=false, level)
3139
end

0 commit comments

Comments
 (0)