-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·45 lines (33 loc) · 860 Bytes
/
configure
File metadata and controls
executable file
·45 lines (33 loc) · 860 Bytes
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
#!/bin/bash
[ -n "$ENV" ] || ENV=development
version=0.0.6-dev # node-sitefile
echo "Configuring project node-sitefile/$version" >&2
echo "PWD (real): $(pwd) ($(pwd -P))" >&2
echo "Host (full): $(hostname) ($(hostname -f))" >&2
echo "User (dir, HOME): $(whoami) ($(cd; pwd -P), $HOME)"
echo "ENV: $ENV"
branch=$(git rev-parse --abbrev-ref HEAD)
echo "Branch: $branch"
echo '{ "sitefilerc": "'$version'" }' > $HOME/.sitefilerc
(
cat <<HEREDOC
module.exports =
site: port: 7011
development: site: port: 7011
testing: site: port: 7012
production: site: port: 7013
HEREDOC
) > config/config.coffee
#[ "$ENV" == "testing" ] && {
#}
case "$(whoami)" in
travis )
# FIXME: fix pm2 hanging at Tavis
case "$branch" in
features/pm2 ) ;;
* )
sed -i.bak 's/pm2//' Sitefile.yaml
;;
esac
;;
esac