34 lines
985 B
Makefile
34 lines
985 B
Makefile
DOT_ENV_FILE=../.env
|
|
|
|
-include ${DOT_ENV_FILE}
|
|
|
|
clean:
|
|
rm -rf markdown-rs
|
|
rm -rf target
|
|
rm -f Cargo.lock
|
|
|
|
init:
|
|
-git clone https://git.stancik.work/lusk/markdown-rs.git
|
|
|
|
release/build: init
|
|
docker run --rm -it \
|
|
-v "${PWD}":/home/rust/src \
|
|
-v "${PWD}/markdown-rs":/home/rust/markdown-rs \
|
|
messense/rust-musl-cross:x86_64-musl /bin/sh -c "cargo build --release && chown -R ${SELF_UID}:${SELF_GID} target"
|
|
|
|
debug/build: init
|
|
@docker run --rm -it \
|
|
-v "${PWD}":/home/rust/src \
|
|
-v "${PWD}/markdown-rs":/home/rust/markdown-rs \
|
|
messense/rust-musl-cross:x86_64-musl /bin/sh -c "cargo build && chown -R ${SELF_UID}:${SELF_GID} target"
|
|
|
|
release/install: release/build
|
|
@cp target/x86_64-unknown-linux-musl/release/md_to_html ~/.local/bin/md_to_html
|
|
|
|
debug/install: debug/build
|
|
@cp target/x86_64-unknown-linux-musl/debug/md_to_html ~/.local/bin/md_to_html
|
|
|
|
run:
|
|
@RUST_LOG=debug md_to_html convert --file test/page.md --to /tmp/test-output.html
|
|
@bat /tmp/test-output.html
|