-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathMakingNewVersion.txt
116 lines (83 loc) · 5.81 KB
/
MakingNewVersion.txt
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Add python 3 compatible build_original_py3.py
You'll need to install nodejs and npm to run the build script. You can do this with anaconda or directly from the nodejs website: https://nodejs.org/en
You'll need to run "npm install" in the Uglify directory (build-tools/Uglify-ES/uglify-es) to install the dependencies.
Then you can run "python build_original_py3.py" from the root directory.
--------------------------------------------------------------------------
Note: After installing nodejs, on Windows you must copy node.exe into the build-tools folder.
An image of the GoDaddy.com DNS data as of April 2019 is in docs/DomainData.png.
********************************************************
* See the start of lib/compiling/GScompiler.js for how *
* to obtain the external libraries used by GlowScript. *
********************************************************
This description of how to build GlowScript is written in terms of the original build program, now named
build_original.py
A more sophisticated build program is build_cli.py contributed by Iblis Lin, which may not be up to date.
There are now two different procedures to handling versioning:
1) Deploy the development version to the website.
You can do this without worrying too much if you haven't changed ide.js or run.js;
it can only break programs that have "GlowScript 0.4dev" and that is expected.
You do this by just pushing the "deploy" button in GAE (Google App Engine) launcher.
2) Release a new packaged version - assume it is 0.4.
This should normally be done after a little experimentation
to make sure that 0.4dev is ready for prime time.
The steps are the following:
In ide/ide.js, update parseVersionHeader.defaultVersion; after 0.4 is released, it would read:
parseVersionHeader.defaultVersion = "0.4"
parseVersionHeader.defaultHeader = "GlowScript " + parseVersionHeader.defaultVersion
// Map each version that can be loaded to a packaged version (usually itself), or
// "unpackaged" if it is the current development version
parseVersionHeader.okVersions = {
__proto__: null,
"0.3": "0.3",
"0.4": "0.4",
"0.4dev" : "0.4",
"0.5dev" : "unpackaged",
}
and the defaultVersion would change to "0.4".
The defaultVersion has the same run time behavior as "package",
but also is the default version encouraged by the editor hints and by new program creation.
Also in ide/ide.js, in the section pages.share, adjust the output of program export;
for example, GlowScript version 2.2 uses the same verdir value as 2.1 for jquery etc.
In untrusted/run.js, update choice of jquery library.
Add to css/redmond a folder with the new name if necessary (sometimes no change is needed)
In ide/templates/index.html change "V e r s i o n X.Y" appropriately, and at the end of
the file update the package/symbols version.
There is a jquery version reference in untrusted/run.html.
Modify build_original.py and lib/glow/property.js to have version = "0.4" and
run it to create the final packages for 0.4.
since the IDE doesn't yet dynamically load symbols based on the version header.
There is a Glowscript program in build-tools/Symbols.js which you need to copy into (presumably local)
glowscript and run to compile the symbols.
You have to copy and paste the results into the appropriate file (package/symbols.X.Y.min.js).
You also have to make a change at the end of ide/templates/index.html to point to the new Symbols file.
At some point hopefully the build process will be more automated
(using node to run this and other javascript parts locally).
Ideally we should create a branch "version-0.4" in the repository at this point,
in case we have to come back and patch an old version for some critical bug.
This has not actually been done so far.
If you're just fixing a bug in 0.4, all you need to do to update the package files produced
in the previous step that involved build.py and property.js is this:
In a terminal, cd to glowscript folder.
Execute 'gcloud info' to check that the project is set to 'glowscript'.
gcloud app deploy --no-promote
This will give a URL to use to test in the cloud, similar to this: https://20211014t164505-dot-glowscript.appspot.com
Alternatively, 'gcloud app browse' brings up glowscript.appspot.com, though I saw this fail (didn't see changes, but this might have been due to caching of an earlier version).
If okay, go to https://console.cloud.google.com/appengine/versions?project=glowscript
You will be in App Engine > Versions; make the window wide to see MIGRATE TRAFFIC.
Choose the new version and then click MIGRATE TRAFFIC to update user glowscript.org
************************************************************************************
UPDATE library files in the GlowScriptOffline package and create zip file
UPDATE the glow library used in VPython 7; generate it with build_original_no_overload.py
(This includes vectors_no_overload.js instead of vectors.js.)
Until Nov. 2020 we updated library files at AWS/S3: https://s3.amazonaws.com/glowscript/package/
but this is no longer relevant; exported files now reference glowscript.org.
*********************************************************************************************
After July 30, 2020, the graphical Google App Engine launcher will not work, and one must
use the gcloud machinery in a terminal. See www.glowscript.org/docs/GlowScriptDocs/local.html
for instructions on installing gcloud. To deploy the new version, in a terminal cd to the
glowscript project and execute "gcloud app deploy". (If this is the first time that you are
deploying to a test site, execute "gcloud app deploy app.yaml dispatch.yaml".)
Test that version 0.3 programs still work, that version 0.4 programs work,
that 0.4dev programs give an error, that 0.4 is the default version for a new program,
and that 0.5dev programs work.
Update examples to use version 0.4.