change port post-build
This commit is contained in:
parent
6b42ac19d1
commit
5ba83793b5
1 changed files with 58 additions and 29 deletions
|
|
@ -1,9 +1,19 @@
|
|||
.PHONY: server server-opt
|
||||
server: surnames.txt names.txt ipaddr.txt
|
||||
GLOBAL_IP=$(cat ipaddr.txt) cargo run
|
||||
DEVPORT=1505
|
||||
DEVFILE="offline-state.json"
|
||||
PRODPORT=48228
|
||||
PRODFILE="state.json"
|
||||
|
||||
MANIFEST=../Cargo.toml
|
||||
|
||||
.PHONY: local global
|
||||
local: surnames.txt names.txt ipaddr.txt
|
||||
echo '"localhost"' > ipaddr.txt
|
||||
cargo run $(DEVPORT) $(DEVFILE)
|
||||
|
||||
server-opt: surnames.txt names.txt ipaddr.txt
|
||||
GLOBAL_IP=$(cat ipaddr.txt) cargo run --release
|
||||
global: surnames.txt names.txt ipaddr.txt
|
||||
make -B ipaddr.txt
|
||||
mkdir -p prod
|
||||
cd prod; cargo run --release $(PRODPORT) $(PRODFILE)
|
||||
|
||||
surnames.txt:
|
||||
curl https://raw.githubusercontent.com/Hyneman/moby-project/672f6bdca054c42d375f065ffee87e8ceba0c242/moby/mwords/21986na.mes |\
|
||||
|
|
|
|||
Loading…
Reference in a new issue