From: Ruben Beltran del Rio Date: Wed, 13 Mar 2024 08:39:46 +0000 (+0100) Subject: Add deb generator X-Git-Tag: 7.0.0~4 X-Git-Url: https://git.r.bdr.sh/rbdr/blog/commitdiff_plain/94b6e2ec638d11ac2048ad3a3cce13e0b990bd87?ds=sidebyside Add deb generator --- diff --git a/.build.yml b/.build.yml index 725c31b..2673e47 100644 --- a/.build.yml +++ b/.build.yml @@ -23,6 +23,7 @@ tasks: make set_rust - install_builders: | cargo install cargo-generate-rpm + cargo install cargo-deb - package: | cd blog make ci diff --git a/Cargo.toml b/Cargo.toml index 8810838..90215ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,3 +21,9 @@ assets = [ { source = "target/release/blog", dest = "/usr/bin/blog", mode = "755" }, { source = "man/blog.1", dest = "/usr/share/man/man1/blog.1", mode = "644" }, ] + +[package.metadata.deb] +assets = [ + { source = "target/release/blog", dest = "/usr/bin/blog", mode = "755" }, + { source = "man/blog.1", dest = "/usr/share/man/man1/blog.1", mode = "644" }, +] diff --git a/Makefile b/Makefile index 2591bc7..eba1bda 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ prepare: build: prepare cargo build --profile $(profile) --target $(target) -release: rpm tar +release: rpm tar dab @$(eval filename := $(app_name)-$(target)-$(channel)) $(architectures): @@ -24,6 +24,14 @@ else $(MAKE) -e target=$@ build endif +deb: build + @$(eval filename := $(app_name)-$(target)-$(channel)) + cargo deb --profile $(profile) --target $(target) + mv target/$(target)/deb/*.deb $(filename).deb + sha256sum $(filename).deb > $(filename).deb.sha256 + rsync -avz $(filename).deb deploy@conchos.unlimited.pizza:/srv/http/build.r.bdr.sh/$(app_name) + rsync -avz $(filename).deb.sha256 deploy@conchos.unlimited.pizza:/srv/http/build.r.bdr.sh/$(app_name) + rpm: build @$(eval filename := $(app_name)-$(target)-$(channel)) cargo generate-rpm --profile $(profile) --target $(target)