mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
974c37f5ac
Former-commit-id: 5e192a6399227a3a5e2fea5d2edb9909a0f7082d [formerly 86ff88b2c1b4105d5714505260617c707d16d3a1] [formerly 067ff986f8031cf22266756e3b4446e99b672433 [formerly 477838db7b
]]
Former-commit-id: 79df6b5b8c1b885419dac3a36ba7268463882d7b [formerly 3c8f5bc04ead1f3b535a838350c22859c2a8a5a6]
Former-commit-id: c0469a373651bda29a09c73aa7ea753273e86458
51 lines
1.7 KiB
Makefile
51 lines
1.7 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-64bit.zip awwkoala static/* templates/*
|
|
rm -f awwkoala
|
|
env GOOS=windows GOARCH=amd64 go build -o awwkoala.exe -v *.go
|
|
zip -9 -r awwkoala-windows-64bit.zip awwkoala.exe static/* templates/*
|
|
rm -f awwkoala.exe
|
|
env GOOS=linux GOARCH=arm go build -o awwkoala -v *.go
|
|
zip -9 -r awwkoala-raspberrypi.zip awwkoala static/* templates/*
|
|
rm -f awwkoala
|
|
env GOOS=darwin GOARCH=amd64 go build -o awwkoala -v *.go
|
|
zip -9 -r awwkoala-macosx-64bit.zip awwkoala static/* templates/*
|
|
rm -f awwkoala
|
|
mv *.zip binaries/
|
|
|
|
|
|
.PHONY: install
|
|
.PHONY: binaries |