-
Notifications
You must be signed in to change notification settings - Fork 0
/
devrepl.jl
43 lines (36 loc) · 1.04 KB
/
devrepl.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Source this script as e.g.
#
# include("PATH/TO/devrepl.jl")
#
# from *any* Julia REPL or run it as e.g.
#
# julia -i --banner=no PATH/TO/devrepl.jl
#
# from anywhere. This will change the current working directory and
# activate/initialize the correct Julia environment for you.
#
# You may also run this in vscode to initialize a development REPL
#
using Pkg
Pkg.activate(joinpath(@__DIR__, "test"))
function _instantiate()
Pkg.develop(path=".")
end
if !isfile(joinpath("test", "Manifest.toml"))
_instantiate()
end
include(joinpath("test", "clean.jl"))
REPL_MESSAGE = """
*******************************************************************************
DEVELOPMENT REPL
* `help()` – Show this message
* `clean()` – Clean up build/doc/testing artifacts
* `distclean()` – Restore to a clean checkout state
* `include("test/runtests.jl")` – Run the tests
*******************************************************************************
"""
"""Show help"""
help() = println(REPL_MESSAGE)
if abspath(PROGRAM_FILE) == @__FILE__
help()
end