Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
b65e05e549 | |||
84f3574aa1 | |||
ed763c5874 | |||
12e32c622e |
28
.drone.yml
28
.drone.yml
@@ -4,12 +4,36 @@ name: default
|
|||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: rust:1.33.0
|
image: rust:1.33.0
|
||||||
|
environment:
|
||||||
|
CARGO_HOME: /drone/.cargo
|
||||||
commands:
|
commands:
|
||||||
- cargo build
|
- cargo build --jobs 1
|
||||||
- name: build_relase
|
- name: build_relase
|
||||||
image: rust:1.33.0
|
image: rust:1.33.0
|
||||||
|
environment:
|
||||||
|
CARGO_HOME: /drone/.cargo
|
||||||
commands:
|
commands:
|
||||||
- cargo build --release
|
- mkdir bin
|
||||||
|
- export CARGO_INSTALL_ROOT=$PWD
|
||||||
|
- rustup target add x86_64-unknown-linux-musl
|
||||||
|
- cargo install --jobs 1 --path . --target x86_64-unknown-linux-musl
|
||||||
|
- mkdir dist
|
||||||
|
- tar cvzf dist/htmlextract.tar.gz bin/*
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
- name: gitea_release
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: gitea_tkn
|
||||||
|
base_url:
|
||||||
|
from_secret: gitea_url
|
||||||
|
files:
|
||||||
|
- dist/*
|
||||||
|
checksum:
|
||||||
|
- md5
|
||||||
|
- sha512
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
|
@@ -77,7 +77,7 @@ fn main() -> Result<(), Box<Error>> {
|
|||||||
// Let's get the actual text in this text node. A text node wraps around
|
// Let's get the actual text in this text node. A text node wraps around
|
||||||
// a RefCell<String>, so we need to call borrow() to get a &str out.
|
// a RefCell<String>, so we need to call borrow() to get a &str out.
|
||||||
//let text = text_node.as_text().unwrap().borrow();
|
//let text = text_node.as_text().unwrap().borrow();
|
||||||
write!(out, "{}", serialize_node(as_node)?)?;
|
out.write_all(serialize_node(as_node)?.as_bytes())?;
|
||||||
/*if let Some(child) = as_node.first_child() {
|
/*if let Some(child) = as_node.first_child() {
|
||||||
|
|
||||||
//TODO: Convert Nodes to String, as this only works for Nodes containing plain text
|
//TODO: Convert Nodes to String, as this only works for Nodes containing plain text
|
||||||
|
Reference in New Issue
Block a user