From 78be60b1a423307b1f4f884fcebfe5ce57b93caa Mon Sep 17 00:00:00 2001 From: Dominic Date: Sun, 20 Oct 2019 17:42:33 +0200 Subject: [PATCH] tidy up --- .gitlab-ci.yml | 15 +++++++++++++++ Cargo.toml | 4 ++++ example/Cargo.toml | 2 +- gotham_restful/Cargo.toml | 3 +-- gotham_restful/LICENSE-Apache | 1 + gotham_restful/LICENSE-EPL | 1 + gotham_restful/LICENSE.md | 1 + gotham_restful/src/types.rs | 3 ++- gotham_restful_derive/Cargo.toml | 1 - gotham_restful_derive/LICENSE-Apache | 1 + gotham_restful_derive/LICENSE-EPL | 1 + gotham_restful_derive/LICENSE.md | 1 + 12 files changed, 29 insertions(+), 5 deletions(-) create mode 120000 gotham_restful/LICENSE-Apache create mode 120000 gotham_restful/LICENSE-EPL create mode 120000 gotham_restful/LICENSE.md create mode 120000 gotham_restful_derive/LICENSE-Apache create mode 120000 gotham_restful_derive/LICENSE-EPL create mode 120000 gotham_restful_derive/LICENSE.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9a80ca6..224ec0b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,3 +37,18 @@ readme: script: - cargo readme -r gotham_restful -t ../README.tpl >README.md.new - diff README.md README.md.new + +publish: + stage: publish + image: msrd0/rust:alpine + before_script: + - cargo -V + - cargo login $CRATES_IO_TOKEN + script: + - cd gotham_restful_derive + - cargo publish + - cd ../gotham_restful + - cargo publish + - cd .. + only: + - tags diff --git a/Cargo.toml b/Cargo.toml index a7b19e1..418c362 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,3 +6,7 @@ members = [ "gotham_restful_derive", "example" ] + +[patch.crates-io] +gotham_restful = { path = "./gotham_restful" } +gotham_restful_derive = { path = "./gotham_restful_derive" } diff --git a/example/Cargo.toml b/example/Cargo.toml index 06ade0c..58ee7ba 100644 --- a/example/Cargo.toml +++ b/example/Cargo.toml @@ -17,7 +17,7 @@ gitlab = { repository = "msrd0/gotham-restful", branch = "master" } fake = "2.2" gotham = "0.4" gotham_derive = "0.4" -gotham_restful = { path = "../gotham_restful", features = ["openapi"] } +gotham_restful = { version = "0.0.1", features = ["openapi"] } hyper = "0.12" log = "0.4" log4rs = { version = "0.8", features = ["console_appender"], default-features = false } diff --git a/gotham_restful/Cargo.toml b/gotham_restful/Cargo.toml index b8dd8b9..c9be69e 100644 --- a/gotham_restful/Cargo.toml +++ b/gotham_restful/Cargo.toml @@ -9,7 +9,6 @@ description = "RESTful additions for Gotham" keywords = ["gotham", "rest", "restful"] license = "EPL-2.0 OR Apache-2.0" readme = "../README.md" -include = ["src/**/*", "Cargo.toml", "../LICENSE"] repository = "https://gitlab.com/msrd0/gotham-restful" [badges] @@ -22,7 +21,7 @@ failure = "0.1" futures = "0.1" gotham = "0.4" gotham_derive = "0.4" -gotham_restful_derive = { path = "../gotham_restful_derive" } +gotham_restful_derive = { version = "0.0.1" } hyper = "0.12" indexmap = { version = "1.0", optional = true } log = { version = "0.4", optional = true } diff --git a/gotham_restful/LICENSE-Apache b/gotham_restful/LICENSE-Apache new file mode 120000 index 0000000..0cd69a3 --- /dev/null +++ b/gotham_restful/LICENSE-Apache @@ -0,0 +1 @@ +../LICENSE-Apache \ No newline at end of file diff --git a/gotham_restful/LICENSE-EPL b/gotham_restful/LICENSE-EPL new file mode 120000 index 0000000..2004d06 --- /dev/null +++ b/gotham_restful/LICENSE-EPL @@ -0,0 +1 @@ +../LICENSE-EPL \ No newline at end of file diff --git a/gotham_restful/LICENSE.md b/gotham_restful/LICENSE.md new file mode 120000 index 0000000..7eabdb1 --- /dev/null +++ b/gotham_restful/LICENSE.md @@ -0,0 +1 @@ +../LICENSE.md \ No newline at end of file diff --git a/gotham_restful/src/types.rs b/gotham_restful/src/types.rs index 9c9cab6..6764595 100644 --- a/gotham_restful/src/types.rs +++ b/gotham_restful/src/types.rs @@ -1,5 +1,6 @@ #[cfg(feature = "openapi")] -use crate::{OpenapiType, result::ResourceError}; +use crate::OpenapiType; +use crate::result::ResourceError; use hyper::Chunk; use mime::{Mime, APPLICATION_JSON}; diff --git a/gotham_restful_derive/Cargo.toml b/gotham_restful_derive/Cargo.toml index 40d109a..3a7e046 100644 --- a/gotham_restful_derive/Cargo.toml +++ b/gotham_restful_derive/Cargo.toml @@ -9,7 +9,6 @@ description = "RESTful additions for Gotham - Derive" keywords = ["gotham", "rest", "restful", "derive"] license = "EPL-2.0 OR Apache-2.0" readme = "../README.md" -include = ["src/**/*", "Cargo.toml", "../LICENSE"] repository = "https://gitlab.com/msrd0/gotham-restful" [lib] diff --git a/gotham_restful_derive/LICENSE-Apache b/gotham_restful_derive/LICENSE-Apache new file mode 120000 index 0000000..0cd69a3 --- /dev/null +++ b/gotham_restful_derive/LICENSE-Apache @@ -0,0 +1 @@ +../LICENSE-Apache \ No newline at end of file diff --git a/gotham_restful_derive/LICENSE-EPL b/gotham_restful_derive/LICENSE-EPL new file mode 120000 index 0000000..2004d06 --- /dev/null +++ b/gotham_restful_derive/LICENSE-EPL @@ -0,0 +1 @@ +../LICENSE-EPL \ No newline at end of file diff --git a/gotham_restful_derive/LICENSE.md b/gotham_restful_derive/LICENSE.md new file mode 120000 index 0000000..7eabdb1 --- /dev/null +++ b/gotham_restful_derive/LICENSE.md @@ -0,0 +1 @@ +../LICENSE.md \ No newline at end of file