euchre-live

Euchre web-app for the socially distant family
git clone git://git.alexkarle.com/euchre-live.git
Log | Files | Refs | README | LICENSE

Makefile (1054B) [raw]


      1 ASSETS := $(shell find assets)
      2 PUBLIC_FILES := $(shell find public)
      3 LIB_FILES := $(shell find lib)
      4 
      5 .PHONY: all
      6 all: test tags
      7 
      8 .PHONY: tags
      9 tags:
     10 	ctags -R lib/ t/ gloat.pl
     11 
     12 .PHONY: test
     13 test:
     14 	perl -c gloat.pl
     15 	perl t/Rules.t
     16 
     17 # If no public files have changed, don't rebuild the JS bundle
     18 # We make this timestamp file the dependency for build to
     19 # ensure we don't do it too often...
     20 .assets.ts: $(ASSETS)
     21 	./bin/build.sh
     22 	touch .assets.ts
     23 
     24 # Only rebuild if any of public/ or the Perl stuff has changed
     25 build: .assets.ts $(PUBLIC_FILES) $(LIB_FILES) gloat.pl
     26 	rm -rf build
     27 	mkdir -p build
     28 	cp -a gloat.pl public lib build
     29 	@echo ">>> Build Success! <<<"
     30 
     31 .PHONY: release
     32 release: build test
     33 	git show HEAD --pretty=full -s |\
     34 	    sed 's/\(Author\|Commit\): \([^<]\+\).*/\1: \2<redacted>/' > build/public/version.txt
     35 	rsync -av --delete --rsh="ssh -o StrictHostKeyChecking=no" \
     36 	    build/ _euchre@euchre.live:prod-el/
     37 	ssh -t -o StrictHostKeyChecking=no euchre.live \
     38 	    doas rcctl restart euchre
     39 
     40 .PHONY: clean
     41 clean:
     42 	rm -rf build public/asset