File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 28
28
# # GridLAB-D marimo notebooks are distributed from the GitHub arras-energy
29
29
# # repository `marimo`.
30
30
# #
31
+ # # Caveats:
32
+ # #
33
+ # # * Master branches only return the "official" index published in
34
+ # # `source/.index`. All other branches return a list of all Python files in
35
+ # # `source/`.
36
+ # #
31
37
# # See also:
32
38
# #
33
39
# # * https://github.com/arras-energy/marimo
@@ -70,7 +76,11 @@ function index()
70
76
#
71
77
# Display a list of available notebooks online
72
78
#
73
- curl -sL -H ' Cache-Control: no-cache' $URL /.index 2>> $LOG
79
+ if [ " $( gridlabd.bin --version=branch) " == " master" ]; then
80
+ curl -sL -H ' Cache-Control: no-cache' $URL /.index 2>> $LOG
81
+ else
82
+ curl -L https://api.github.com/repos/arras-energy/marimo/contents/source 2>> $LOG | grep ' "name": ".*\.py",' /tmp/index.json | cut -f2 -d: | cut -f1 -d. | tr -cd " A-Za-z0-9_\\ n"
83
+ fi
74
84
}
75
85
76
86
function getlist()
You can’t perform that action at this time.
0 commit comments