Decouple from markdown-rs folder. Added cleanup and test targets.
Shortened readme.
This commit is contained in:
@@ -1,24 +1,33 @@
|
|||||||
release/build:
|
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 \
|
docker run --rm -it \
|
||||||
-v "${PWD}":/home/rust/src \
|
-v "${PWD}":/home/rust/src \
|
||||||
-v "${PWD}/../markdown-rs":/home/rust/markdown-rs \
|
-v "${PWD}/markdown-rs":/home/rust/markdown-rs \
|
||||||
messense/rust-musl-cross:x86_64-musl /bin/sh -c "cargo build --release && chown -R 1000:1001 target"
|
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
|
release/install: release/build
|
||||||
@cp target/x86_64-unknown-linux-musl/release/md_to_html ~/.local/bin/md_to_html
|
@cp target/x86_64-unknown-linux-musl/release/md_to_html ~/.local/bin/md_to_html
|
||||||
@cp target/x86_64-unknown-linux-musl/release/md_to_html ../wiki/docker/rootfs/bin/md_to_html
|
|
||||||
|
|
||||||
debug/build:
|
|
||||||
@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 1000:1001 target"
|
|
||||||
|
|
||||||
debug/install: debug/build
|
debug/install: debug/build
|
||||||
@cp target/x86_64-unknown-linux-musl/debug/md_to_html ~/.local/bin/md_to_html
|
@cp target/x86_64-unknown-linux-musl/debug/md_to_html ~/.local/bin/md_to_html
|
||||||
@cp target/x86_64-unknown-linux-musl/debug/md_to_html ../wiki/docker/rootfs/bin/md_to_html
|
|
||||||
|
|
||||||
test: release/install
|
run:
|
||||||
@#RUST_LOG=debug cargo run md_to_html
|
@RUST_LOG=debug md_to_html convert --file test/page.md --to /tmp/test-output.html
|
||||||
@RUST_LOG=debug md_to_html convert --file ../wiki/container-data/pages/home.md --to /tmp/output.html
|
@bat /tmp/test-output.html
|
||||||
@cat /tmp/output.html
|
|
||||||
|
|||||||
@@ -5,10 +5,7 @@ Modified version of [Makudaun](https://github.com/orzklv/makudaun). This version
|
|||||||
## Build and Installation
|
## Build and Installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ rust-musl-builder
|
$ make release/install
|
||||||
root@f8512336e6ce:/home/rust/src# cargo build --release
|
|
||||||
exit
|
|
||||||
$ cp target/x86_64-unknown-linux-musl/release/md_to_html ~/.local/bin/md_to_html
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../markdown-rs/
|
|
||||||
Reference in New Issue
Block a user