Explorar o código

add ci target

Tobias Simetsreiter %!s(int64=4) %!d(string=hai) anos
pai
achega
c1e99523d9
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      Makefile

+ 7 - 1
Makefile

@@ -1,4 +1,5 @@
 
+SOURCES := $(shell find src -print)
 
 .PHONY: build
 build: build/bootstrap_captive.sha256
@@ -9,7 +10,7 @@ update: rebuild
 	rsync build/bootstrap_captive  ${DEPLOY_REMOTE}:/usr/local/bin/
 	ssh  ${DEPLOY_REMOTE} "bootstrap_captive unpack && systemctl restart bootstrap_captive_server"
 
-build/src: src
+build/src: $(SOURCES)
 	mkdir -p build
 	rsync -ai --delete --exclude __pycache__ src/ build/src/
 	uuidgen > build/src/build.uuid
@@ -21,5 +22,10 @@ build/bootstrap_captive: build/src
 	./sharxz.sh build/src/ ${@}.tmp
 	mv ${@}.tmp ${@}
 
+ci:
+	git fetch
+	git reset --hard ${CI_REF}
+	$(MAKE) build
+
 clean:
 	rm -rf build