Skip to content

Commit 94f8bad

Browse files
authored
Merge branch 'mainmast' into horizon
2 parents bbb7daa + 5d365d7 commit 94f8bad

File tree

11 files changed

+193
-126
lines changed

11 files changed

+193
-126
lines changed

.travis.yml

Lines changed: 0 additions & 94 deletions
This file was deleted.

.travis.yml.release

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
language: ruby
2+
rvm:
3+
- 2.2
4+
env:
5+
- secure: "E19TyEFE1iQSRrZI4w6ahWgFGEFZBiUgxn/Pqq5sQwHlMNpai+bVydDRVlcQ0NsrdPmyXY/4+29wMjsAHbSaiBuqgG5PbtpChJK7a+8583G6CrbkWdZgwkMDpqPQ2IBEWVYeybvl36wuXJ4HNCqImPODWvX1Wxzk5RCK/gM4PNu3OdmQm3+6O8y1N6r0Y/lnqeAxhaZ5wv01/6EE3I3rAbnFxnu0wIJ7AfNV64VRk+tqwYuM5fLXrl6yhelSwp9q5CLEwvvYknBkklHAXbvxc2qo8XfZb6Zb701NyGvFW86Acgo1dytqV+BNmxNj4FfnXj+rxi/SDpiKEifzj5UYLIAgAx/qbxWSHD8SHiOL1WMa7N3vN2Dh+O+9vCLDwtpzbC0kJqxVMei8buAR4pLReZO0OsmHGXDPApoqOdxvQ0Z2VtEWojIWaJSIl0gTaWKAPAE6GMT0zRQcmm6GPXmLpWGc/9MZKJ5lTXQloucRaStRhPYV4x2HNF4vVZmJ0RWQexAX4qsUiaVFs0jdnJTDvgyPWj+f7qJaaqNFfXz9TyP2N8LSjPdGBYfkWIbkv8dXjJCufXX29BbOD5Yq1NcRQxgTnQO1cvXs1/MJOrK8tCAQ/rZUqQakBMg71fhznOm2lejiiingfnq846C1v27KxZzFLnGIOfDUbMAgS1sbGUU="
6+
script:
7+
- echo "Skipping tests"
8+
#- mocha --harmony
9+
before_install:
10+
- . $HOME/.nvm/nvm.sh
11+
- nvm install stable
12+
- nvm use stable
13+
- npm install -g heroku-cli
14+
install:
15+
- npm install --ignore-scripts
16+
- make web
17+
- make deploy-cpo-main
18+
script:
19+
- echo "No tests on deploy branch"
20+
before_deploy:
21+
- export SHORT_COMMIT=`echo $TRAVIS_COMMIT | cut -c1-7`
22+
- export GIT_REV=`echo $TRAVIS_COMMIT`
23+
- export GIT_BRANCH=`echo $TRAVIS_BRANCH`
24+
- heroku config:set --app code-pyret-org GIT_REV=$GIT_REV
25+
- heroku config:set --app code-pyret-org GIT_BRANCH=$GIT_REV
26+
- heroku config:set --app code-pyret-org CURRENT_PYRET_RELEASE=$SHORT_COMMIT
27+
- heroku config:set --app code-pyret-org PYRET=https://d251z2akfyabv3.cloudfront.net/releases/$SHORT_COMMIT/cpo-main.jarr.gz.js
28+
deploy:
29+
- provider: s3
30+
access_key_id: AKIAJI5QOXMOMALYEG3Q
31+
secret_access_key:
32+
secure: eNHYX/jlPW4ZWOhl3q2XzXaEG0RF3LyNmJ2VULnAocCKfgcSLvrAJalzXZ7wyK7WOBPN9liaLaams0Vq0WqabS09F7TQQYQG0yHx5L2bxkiUmJmMlpku0/Her1/6j+QH7YlLHjHmHF4HNJUgEpp/mwDF4x4/NdQ9H8wGdJSw3OwkE7+27Xg/5OmgKkDOJR/6d9y5Ha8PvVeEt1XC4OMtEn+Himao/X8GUVtrCmnyaACoyuIAS0aYkD5YdpXoluNJW3Iv/aqZOic5zrxx0XCfAneD/bQfCI0LneOICOjLxWkHttjFVTLfzJr4cCB1mFfAAh6fh0BipTVQZze3qp02ziKDJgYPD/Lo6pyuyG+ENwCS/s0jOywpTT4L0MdGUC50eNrrRFpQ5Fch6e2zvdWoj9/eB42VDijP8d+nguwRm/gt/z/6vo4jZaVGdlZaUr4Bx1ejX/30aiw+ezQjPoD2A7tAH7A9qygVAPmvJ7kvYOf+jLzhQUxkQna4lx2BdpirhX/QT8GLoei6LuZ/MQmy79jmlQnR7PUpeVwuN4DK0X5W/0774wPcFhETvr7IpF5DWdZlb8wqg8440abhD2sYBYqpmv9FehdEBSgyFvA2uxIZ7AcBICv47Lz9cvB6rjN1cjAUWRaSB9q54ej18l8o68OZUXe1TY5ek3c+Go2V88k=
33+
bucket: pyret-releases
34+
local-dir: build/release
35+
upload-dir: releases
36+
acl: public_read
37+
skip_cleanup: true
38+
detect_encoding: true
39+
on:
40+
repo: brownplt/code.pyret.org
41+
branch: release
42+
- provider: heroku
43+
app: code-pyret-org
44+
api_key:
45+
secure: h516V/Ze+mXMWSinCVzpwuRBsdx3nNbo7iEsWovrdIoVwz01tEQnwaTsGMviOq7P/X5bu+PuOAD0Kpm3lfds0/ctaB4y/O5zKvba1A4jdHSjvgADRvgbx1FxoArkwnuI1s9/TFfTXdN7zFDbJWFiXy3g0o7xp5X22Q21ZgrjGLv0fNBbxRvIm441lQgn13uZD45+uS12jSDMJ7DZU7vBoSnq1DACWHNuWORb/PRZnDPpwjKUwX9BEYaYmkoupB2WpgcSTlglVnDpFHnaOmUO/yeJHlsuFe4E4BMRrjccsSB2ZGdj05YtR4pg2biQSJmXMe8+OfBpteH8MF4LYH4mIEsA56xDR47IYGaGDo7oxIaS6gWE7u+w2UkMO5/Tv4W+V9hHEoAA9stX52x8jHDUe8qcYs/Gb/GWYLQFkolr8dczrBF/kojUELm7KztlOWmPCxW6kTd3M4imWO0bbHEHgDDlxLbhBgYLkh+Jw3BSwaDeWx2G00Xy/cZ2XELN1s5cnQ+g7A2/YjaRos2hX59HCFALgx8FoMzXCmnUXZX5hqUloMjY1a/zomw+fa5WEOYF41TRQmkdqwmwj9WiW160jXtOJbdKTncdw9BXc9OULDjGg4FbPPMCT/zva3AsMYoWbGJdLLEhQPyUsf1gzPz7ToZ5E8ykxWpopNDQg7i2mKY=
46+
on:
47+
repo: brownplt/code.pyret.org
48+
branch: release

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ PYRET=$(call NODE_MODULE,pyret-lang)/../..
2727
CPOMAIN=build/web/js/cpo-main.jarr
2828
CPOGZ=build/web/js/cpo-main.jarr.gz.js
2929
PHASEA=pyret/build/phaseA/pyret.jarr
30+
COMMITID=$(shell git rev-parse --short HEAD)
3031

3132
.PHONY : test_node_module
3233
test_node_module:
@@ -371,7 +372,11 @@ link-pyret:
371372
ln -s $(PYRET) pyret
372373
(cd $(PYRET) && $(MAKE) phaseA-deps)
373374

374-
deploy-cpo-main: link-pyret $(CPOMAIN) $(CPOGZ)
375+
deploy-cpo-main: link-pyret $(CPOMAIN) cpo-main-release
376+
377+
cpo-main-release: $(CPOGZ)
378+
mkdir -p build/release/$(COMMITID);
379+
cp $(CPOGZ) build/release/$(COMMITID)/
375380

376381
TROVE_JS := src/web/js/trove/*.js
377382
TROVE_ARR := src/web/arr/trove/*.arr

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,50 @@ https://devcenter.heroku.com/articles/getting-started-with-nodejs
187187
$ heroku ps:scale web=1
188188

189189
7. Now run `heroku open` or visit appname.herokuapp.com.
190+
190191
8. Tips for redeploy: if you don't see a successful build under heroku webiste's activity tab, but get "everything is up-to-date" when you run `git push heroku <localbranch>:master`, or your build doesn't look up-to-date, you can do an empty commit: `git commit --allow-empty -m "force deploy"`
192+
193+
## Production Deployment
194+
195+
This branch (`release`) is pushed to in order to trigger deploys of the "real"
196+
version of code.pyret.org. If you have permission to push to this branch, you
197+
can cause code.pyret.org to update simply by pushing.
198+
199+
There are several encrypted credentials stored in Travis. Anyone's will work,
200+
they just need to have access to the right places.
201+
202+
- The access key id and access token for an appropriate S3 bucket. This is
203+
where the built and compressed `cpo-main.jarr.gz` file will go.
204+
- The access key for a Heroku account, which goes in two places; first, in the
205+
`global` section so the heroku toolbelt can run, and second in the api\_key
206+
field of the Heroku deployment itself. This needs to be a Heroku account
207+
that has access to the `code-pyret-org` project
208+
209+
The build creates `cpo-main.jarr.gz`, stores it in
210+
`build/release/<short-commit-id>/cpo-main.jarr.gz`, and then copies that
211+
directory over to the given S3 bucket.
212+
213+
It then sets the current Heroku `PYRET` variable to point to the appropriate
214+
URL – in the current deployment, this URL is an AWS CloudFront endpoint that
215+
is backed by a S3 bucket, but any path to the bucket with the right ending
216+
commit hash will work. Note that it is quite useful to update this variable
217+
because it changes the URL that is fetched on loading CPO, so it will bypass
218+
the users' browser cache the next time they visit. It's a Good Idea to have
219+
very long cache settings on the CPO main JavaScript file, and also good to make
220+
sure folks get the update.
221+
222+
In addition, this means that it's easy to roll back using Heroku's rollback
223+
feature, since all the copies of the built standalones are available.
224+
225+
This branch doesn't run the Selenium tests; the various development branches
226+
and master do that. Mainly this is for expedience, since all commits go
227+
through a development branch that runs tests anyway, so it would merely
228+
lengthen the path to deploying. Also, running the tests on multiple browsers
229+
causes the heroku build to fire twice, which causes an error (see
230+
https://github.com/travis-ci/travis-ci/issues/929).
231+
232+
This branch is access-controlled to admins of brownplt and a few others. This
233+
is mainly to prevent _mistakes_ (Oops! I pushed to `release` and it broke!)
234+
more than to lock anyone out.
235+
236+

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
"mustache-express": "^1.3.2",
4949
"node-uuid": "^1.4.8",
5050
"popper.js": "^1.16.1",
51-
"pyret-codemirror-mode": "github:brownplt/pyret-codemirror-mode#master",
52-
"pyret-lang": "git://github.com/brownplt/pyret-lang.git#horizon",
51+
"pyret-codemirror-mode": "git://github.com/brownplt/pyret-codemirror-mode.git#master",
52+
"pyret-lang": "git+https://github.com/brownplt/pyret-lang.git#master",
5353
"q": "~1.4.1",
5454
"react": "^15.7.0",
5555
"react-dom": "^15.7.0",

package.json.release

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"name": "code.pyret.org",
3+
"version": "0.0.0",
4+
"description": "A simple IDE for Pyret",
5+
"main": "index.js",
6+
"engines": {
7+
"npm": "3.x"
8+
},
9+
"dependencies": {
10+
"babel-core": "^6.17.0",
11+
"babel-eslint": "^6.0.4",
12+
"babel-loader": "^6.2.4",
13+
"babel-plugin-transform-decorators-legacy": "1.3.4",
14+
"babel-polyfill": "^6.9.1",
15+
"babel-preset-es2015": "6.16.0",
16+
"babel-preset-react": "6.16.0",
17+
"babel-preset-stage-2": "6.17.0",
18+
"body-parser": "^1.15.2",
19+
"codemirror": "~5.19.0",
20+
"colorspaces": "0.1.4",
21+
"cookie-parser": "^1.0.1",
22+
"cookie-session": "^1.0.1",
23+
"css-loader": "0.25.0",
24+
"csurf": "^1.1.0",
25+
"d3": "~3",
26+
"d3-tip": "git://github.com/sorawee/d3-tip",
27+
"dotenv": "^2.0.0",
28+
"es6-shim": "0.35.0",
29+
"eslint": "^2.12.0",
30+
"express": "^4.1.1",
31+
"git-rev-sync": "^1.7.1",
32+
"googleapis": "^12.4.0",
33+
"isparta-loader": "2.0.0",
34+
"jasmine-core": "2.5.2",
35+
"js-md5": "^0.4.1",
36+
"jwt-simple": "^0.2.0",
37+
"karma": "1.3.0",
38+
"karma-babel-preprocessor": "6.0.1",
39+
"karma-chrome-launcher": "2.0.0",
40+
"karma-coverage": "1.1.1",
41+
"karma-coveralls": "1.1.2",
42+
"karma-jasmine": "1.0.2",
43+
"karma-sourcemap-loader": "0.3.7",
44+
"karma-webpack": "1.8.0",
45+
"lodash": "~2.4.1",
46+
"mocha": "^2.2.1",
47+
"mustache": "^0.8.1",
48+
"mustache-express": "^1.2.1",
49+
"node-static": "^0.7.3",
50+
"node-uuid": "^1.4.1",
51+
"pyret-codemirror-mode": "git://github.com/brownplt/pyret-codemirror-mode#master",
52+
"pyret-ide": "git://github.com/pcardune/pyret-ide#master",
53+
"pyret-lang": "git://github.com/brownplt/pyret-lang.git#horizon",
54+
"q": "~1.4.1",
55+
"react": "^15.3.2",
56+
"react-dom": "^15.3.2",
57+
"redis": "^0.10.3",
58+
"request": "^2.34.0",
59+
"requirejs": "2.1.14",
60+
"s-expression": "~2.2.0",
61+
"script-loader": "~0.7.0",
62+
"seedrandom": "~2.3.10",
63+
"selenium-webdriver": "^2.41.0",
64+
"style-loader": "0.13.1",
65+
"supervisor": "^0.11.0",
66+
"url.js": "^1.0.2",
67+
"webpack": "^1.13.1",
68+
"webpack-dev-server": "^1.14.1"
69+
},
70+
"scripts": {
71+
"local-install": "heroku local:run npm install",
72+
"postinstall": "webpack && make -j3 web",
73+
"test": "karma start --single-run",
74+
"test-watch": "karma start",
75+
"lint": "eslint src",
76+
"build": "heroku local:run make web-local",
77+
"mocha": "heroku local:run mocha",
78+
"start": "heroku local:run supervisor --poll-interval 700 --watch src/run.js,src/server.js src/run.js & heroku local:run webpack-dev-server --port 5001"
79+
},
80+
"repository": {
81+
"type": "git",
82+
"url": "git://github.com/brownplt/code.pyret.org"
83+
},
84+
"author": "Joe Politz",
85+
"license": "Apache-2.0",
86+
"devDependencies": {
87+
"babel-preset-stage-2": "^6.17.0"
88+
}
89+
}

src/web/blocks.html

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,6 @@ <h2 id="menutitle" class="screenreader-only">Navigation Controls</h2>
125125
tabindex="-1" target="_blank" href="https://groups.google.com/forum/#!forum/pyret-discuss">Discuss Pyret</a>
126126
</div>
127127
</li>
128-
<li role="presentation">
129-
<div id="fullConnectButton" class="menuButton loginOnly">
130-
<a class="focusable" role="menuitem"
131-
aria-describedby="mhelp-submenu mhelp-activate mhelp-escape-submenu"
132-
tabindex="-1" href="javascript:void(0)">Enable Full Google Access</a>
133-
</div>
134-
</li>
135128
<li role="presentation">
136129
<div id="choose-context" class="menuButton">
137130
<a class="focusable" role="menuitem"

0 commit comments

Comments
 (0)