Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.DS_Store
node_modules
local
temp
temp
.vscode/*
!.vscode/tasks.json
21 changes: 21 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"globals" : {
"$" : true,
"alert" : true,
"angular" : true,
"app" : true,
"async" : true,
"moment" : true,
"window" : true,
"$rootScope" : true,
"Highcharts" : true,
"$filter" : true,
"DOMAINS" : true,
"renderPDF" : true
},
"esversion" : 6,
"curly" : true,
"forin" : true,
"strict" : "implied",
"node" : true
}
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

26 changes: 26 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Install pod",
"type": "shell",
"command": "sudo npm i -g .",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true
},
"options": {
"cwd": "${workspaceRoot}"
}
}
]
}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ fi
# restart is automatic so no need to include that here
```

You can also access an apps environment variables directly in the podhook by accessing the variable with the environment variable name. For example:
```bash
# runs npm install with the node_env setting in .podrc, so it can ommit dev dependencies if on production
NODE_ENV=$NODE_ENV npm install
```

You can also directly edit the post-receive script of an app found in `pod-root-dir/repos/my-app.git/hooks/post-receive` if you wish.

## Using the API
Expand Down
2 changes: 1 addition & 1 deletion bin/pod
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env node
require('../lib/cli')
require('../lib/cli');
18 changes: 9 additions & 9 deletions hooks/post-receive
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ git reset --hard origin/master

# if has .podhook, execute that; otherwise default
if [ -f .podhook ]; then
bash .podhook
rc=$?
if [[ $rc != 0 ]]; then
echo "`tput setaf 1`ERROR: .podhook exited with code $rc, working tree is reverted.`tput sgr0`"
git reset $LAST_COMMIT --hard
exit $rc
fi
bash .podhook
rc=$?
if [[ $rc != 0 ]]; then
echo "`tput setaf 1`ERROR: .podhook exited with code $rc, working tree is reverted.`tput sgr0`"
git reset $LAST_COMMIT --hard
exit $rc
fi
elif [ -f package.json ]; then
npm install
npm install
fi

pod stop {{app}}
pod start {{app}}
pod start {{app}}
Loading