gratipay / grtp.co

Gratipay Widgets + API
https://grtp.co/
MIT License
26 stars 19 forks source link

deploy once and document process #64

Closed chadwhitacre closed 10 years ago

chadwhitacre commented 10 years ago

I've never done a gttp.co deployment before. Time to figure this out and update the README.

chadwhitacre commented 10 years ago

IRC

chadwhitacre commented 10 years ago
$ git remote add prod gttp@gttp.co:production/.git
chadwhitacre commented 10 years ago

Then git push prod. I'm getting a failure:

remote: Warning: Task "minjson" not found. Use --force to continue.
remote:
remote: Aborted due to warnings.
chadwhitacre commented 10 years ago

We have a post-receive hook (at production/.git/post-receive) that updates the working copy with the just-pushed changes, and then runs some grunt tasks:

#!/bin/sh
cd ..
env -i git reset --hard

# wipe out node_modules and reinstall
rm -rf node_modules
npm install .

# minify JS and JSON
npm install grunt-cli
./node_modules/grunt-cli/bin/grunt minify

# normalize permissions - shouldn't be needed, but here in case it becomes necessary
# chmod -Rf g+w .
chadwhitacre commented 10 years ago

I am looking to work on this locally and I don't have npm installed apparently?

chadwhitacre commented 10 years ago
$ node --version
v0.10.18
$
chadwhitacre commented 10 years ago

locate npm finds stuff. What is up?

"Get the pkg. npm is in it."

https://www.npmjs.org/doc/README.html

chadwhitacre commented 10 years ago
$ node --version
v0.10.31
$ npm --version
1.4.23
$ *shrug*
chadwhitacre commented 10 years ago
$ make
npm install
-
chadwhitacre commented 10 years ago

Okay! I can reproduce Task "minjson" not found. locally.

chadwhitacre commented 10 years ago

P.S. @kaguillera This ticket is a good example of debugging in public, as we were talking about yesterday. :-)

chadwhitacre commented 10 years ago

So either we drop the call to minjson, or we implement that call. How much work is it to implement the call?

http://gruntjs.com/creating-tasks

chadwhitacre commented 10 years ago

Also, why is this broken? Any ideas, @rummik?

chadwhitacre commented 10 years ago

Okay! We moved from JSON widgets to HTML in 6b0be7b2ba87e07b130b3956e5c02e1fc23b8d2b. But minjson was only partially removed. The answer is to remove the rest of it.

chadwhitacre commented 10 years ago

Done, without errors.

Blam. :-)

chadwhitacre commented 10 years ago

Documentation in ae3a0e9833533e7d3cd3de6b9dedcdd2290a8fe6.