1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/Makefile
Zack Scholl 2a41a03b5c Updated - websocket switches with SSL
Automatic detection of IP address (for local only)
Added binary building (not ready)


Former-commit-id: 7729b642f8489c631e614b0e1190a9e6eb387443 [formerly 375f6ae8a94b41342555065ac0e35f436e338a5f] [formerly 08e05a2c6c93ad9e1db26f047951278068271f7f [formerly f934edc757]]
Former-commit-id: cd3c0e21fbd07389ca6eba5795ed4207dd7f474d [formerly c21027b049a07d1d906d8340e64cf3da73a8fe3f]
Former-commit-id: afa01eda756447cba035f4e1c40c71be3001979a
2016-02-15 16:59:32 -05:00

41 lines
1.2 KiB
Makefile

ADDRESS = awwkoala.com
PORT = 8003
CUR_DIR = $(shell bash -c 'pwd')
USERCUR = $(shell bash -c 'whoami')
make:
go build
install:
rm -rf jinstall
mkdir jinstall
cp install/awwkoala.nginx jinstall/awwkoala.nginx
sed -i 's/PORT/$(PORT)/g' jinstall/awwkoala.nginx
sed -i 's/ADDRESS/$(ADDRESS)/g' jinstall/awwkoala.nginx
sed -i 's^CUR_DIR^$(CUR_DIR)^g' jinstall/awwkoala.nginx
cp install/awwkoala.init jinstall/awwkoala.init
sed -i 's/EXT_ADDRESS/$(ADDRESS)/g' jinstall/awwkoala.init
sed -i 's^CUR_DIR^$(CUR_DIR)^g' jinstall/awwkoala.init
sed -i 's^USERCUR^$(USERCUR)^g' jinstall/awwkoala.init
sed -i 's^PORT^$(PORT)^g' jinstall/awwkoala.init
cp jinstall/awwkoala.init /etc/init.d/awwkoala.init
chmod +x /etc/init.d/awwkoala.init
cp jinstall/awwkoala.nginx /etc/nginx/sites-available/awwkoala.nginx
ln -fs /etc/nginx/sites-available/awwkoala.nginx /etc/nginx/sites-enabled/awwkoala.nginx
/etc/init.d/nginx reload
/etc/init.d/nginx restart
/etc/init.d/awwkoala.init restart
rm -rf jinstall
binaries:
rm -rf binaries
rm -f awwkoala
mkdir binaries
env GOOS=linux GOARCH=amd64 go build -o awwkoala -v *.go
zip -9 -r awwkoala-linux-amd64.zip awwkoala static/* templates/*
rm -f awwkoala
.PHONY: install
.PHONY: binaries