aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-01-24 00:08:42 +0100
committerRuben Beltran del Rio <git@r.bdr.sh>2025-01-24 00:08:42 +0100
commit48408b9e42eaeeaf0944f9a37f7882ba9ddc7f19 (patch)
tree8e024f22146dfc119d4f7e77f9801461ecf47caf /Makefile
Add example request structure
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile36
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..64bc1c6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,36 @@
+profile := dev
+target = $(shell rustc -vV | grep host | awk '{print $$2}')
+app_name := page
+
+default: build
+
+set_rust:
+ rustup default stable
+
+prepare:
+ rustup target add $(target)
+
+build: prepare
+ cargo build --profile $(profile) --target $(target)
+
+test:
+ cargo test
+
+coverage:
+ cargo tarpaulin
+
+format:
+ cargo fmt && cargo clippy --fix
+
+lint:
+ cargo fmt -- --check && cargo clippy
+
+release:
+ cargo publish
+
+ci: lint coverage
+ifneq (,$(findstring refs/tags/,$(GIT_REF)))
+ $(MAKE) release
+endif
+
+.PHONY: default set_rust prepare build test coverage format lint release ci