From af6aa3c0bf6a941de761afeb7553aeb7d156fc1f Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sat, 24 Jul 2021 11:55:56 +0200 Subject: [PATCH 1/2] Distribute Lemmy via crates.io --- Cargo.lock | 30 ++++++++++++++-------------- Cargo.toml | 30 ++++++++++++++++------------ crates/api/Cargo.toml | 22 ++++++++++---------- crates/api_common/Cargo.toml | 16 ++++++++------- crates/api_crud/Cargo.toml | 22 ++++++++++---------- crates/apub/Cargo.toml | 20 ++++++++++--------- crates/apub_lib/Cargo.toml | 10 ++++++---- crates/apub_lib_derive/Cargo.toml | 6 ++++-- crates/db_queries/Cargo.toml | 8 +++++--- crates/db_schema/Cargo.toml | 4 +++- crates/db_views/Cargo.toml | 8 +++++--- crates/db_views_actor/Cargo.toml | 8 +++++--- crates/db_views_moderator/Cargo.toml | 8 +++++--- crates/routes/Cargo.toml | 18 +++++++++-------- crates/utils/Cargo.toml | 4 +++- crates/websocket/Cargo.toml | 12 ++++++----- scripts/cargo-publish.sh | 18 +++++++++++++++++ 17 files changed, 147 insertions(+), 97 deletions(-) create mode 100755 scripts/cargo-publish.sh diff --git a/Cargo.lock b/Cargo.lock index ee05a46ce..ec4e7dc73 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1550,7 +1550,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lemmy_api" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "actix", "actix-rt", @@ -1595,7 +1595,7 @@ dependencies = [ [[package]] name = "lemmy_api_common" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "actix-web", "chrono", @@ -1614,7 +1614,7 @@ dependencies = [ [[package]] name = "lemmy_api_crud" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "actix", "actix-rt", @@ -1658,7 +1658,7 @@ dependencies = [ [[package]] name = "lemmy_apub" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "activitystreams", "activitystreams-ext", @@ -1706,7 +1706,7 @@ dependencies = [ [[package]] name = "lemmy_apub_lib" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "activitystreams", "activitystreams-ext", @@ -1721,7 +1721,7 @@ dependencies = [ [[package]] name = "lemmy_apub_lib_derive" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "proc-macro2 1.0.27", "quote 1.0.9", @@ -1731,7 +1731,7 @@ dependencies = [ [[package]] name = "lemmy_db_queries" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "bcrypt", "chrono", @@ -1753,7 +1753,7 @@ dependencies = [ [[package]] name = "lemmy_db_schema" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "chrono", "diesel", @@ -1766,7 +1766,7 @@ dependencies = [ [[package]] name = "lemmy_db_views" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "diesel", "lemmy_db_queries", @@ -1779,7 +1779,7 @@ dependencies = [ [[package]] name = "lemmy_db_views_actor" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "diesel", "lemmy_db_queries", @@ -1789,7 +1789,7 @@ dependencies = [ [[package]] name = "lemmy_db_views_moderator" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "diesel", "lemmy_db_queries", @@ -1799,7 +1799,7 @@ dependencies = [ [[package]] name = "lemmy_routes" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "actix", "actix-web", @@ -1826,7 +1826,7 @@ dependencies = [ [[package]] name = "lemmy_server" -version = "0.0.1" +version = "0.11.3-rc.5" dependencies = [ "activitystreams", "actix", @@ -1864,7 +1864,7 @@ dependencies = [ [[package]] name = "lemmy_utils" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "actix-rt", "actix-web", @@ -1897,7 +1897,7 @@ dependencies = [ [[package]] name = "lemmy_websocket" -version = "0.1.0" +version = "0.11.3-rc.5" dependencies = [ "actix", "actix-web", diff --git a/Cargo.toml b/Cargo.toml index b41020843..8ce03dbe8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,11 @@ [package] name = "lemmy_server" -version = "0.0.1" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +homepage = "https://join-lemmy.org/" +license = "AGPL-3.0" +documentation = "https://join-lemmy.org/docs/en/index.html" [lib] doctest = false @@ -28,18 +32,18 @@ members = [ ] [dependencies] -lemmy_api = { path = "./crates/api" } -lemmy_api_crud = { path = "./crates/api_crud" } -lemmy_apub = { path = "./crates/apub" } -lemmy_utils = { path = "./crates/utils" } -lemmy_db_schema = { path = "./crates/db_schema" } -lemmy_db_queries = { path = "./crates/db_queries" } -lemmy_db_views = { path = "./crates/db_views" } -lemmy_db_views_moderator = { path = "./crates/db_views_moderator" } -lemmy_db_views_actor = { path = "./crates/db_views_actor" } -lemmy_api_common = { path = "crates/api_common" } -lemmy_websocket = { path = "./crates/websocket" } -lemmy_routes = { path = "./crates/routes" } +lemmy_api = { version = "0.11.3-rc.5", path = "./crates/api" } +lemmy_api_crud = { version = "0.11.3-rc.5", path = "./crates/api_crud" } +lemmy_apub = { version = "0.11.3-rc.5", path = "./crates/apub" } +lemmy_utils = { version = "0.11.3-rc.5", path = "./crates/utils" } +lemmy_db_schema = { version = "0.11.3-rc.5", path = "./crates/db_schema" } +lemmy_db_queries = { version = "0.11.3-rc.5", path = "./crates/db_queries" } +lemmy_db_views = { version = "0.11.3-rc.5", path = "./crates/db_views" } +lemmy_db_views_moderator = { version = "0.11.3-rc.5", path = "./crates/db_views_moderator" } +lemmy_db_views_actor = { version = "0.11.3-rc.5", path = "./crates/db_views_actor" } +lemmy_api_common = { version = "0.11.3-rc.5", path = "crates/api_common" } +lemmy_websocket = { version = "0.11.3-rc.5", path = "./crates/websocket" } +lemmy_routes = { version = "0.11.3-rc.5", path = "./crates/routes" } diesel = "1.4.7" diesel_migrations = "1.4.0" chrono = { version = "0.4.19", features = ["serde"] } diff --git a/crates/api/Cargo.toml b/crates/api/Cargo.toml index 2f497f514..74f21df0b 100644 --- a/crates/api/Cargo.toml +++ b/crates/api/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "lemmy_api" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [lib] name = "lemmy_api" @@ -9,15 +11,15 @@ path = "src/lib.rs" doctest = false [dependencies] -lemmy_apub = { path = "../apub" } -lemmy_utils = { path = "../utils" } -lemmy_db_queries = { path = "../db_queries" } -lemmy_db_schema = { path = "../db_schema" } -lemmy_db_views = { path = "../db_views" } -lemmy_db_views_moderator = { path = "../db_views_moderator" } -lemmy_db_views_actor = { path = "../db_views_actor" } -lemmy_api_common = { path = "../api_common" } -lemmy_websocket = { path = "../websocket" } +lemmy_apub = { version = "0.11.3-rc.5", path = "../apub" } +lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } +lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } +lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } +lemmy_db_views = { version = "0.11.3-rc.5", path = "../db_views" } +lemmy_db_views_moderator = { version = "0.11.3-rc.5", path = "../db_views_moderator" } +lemmy_db_views_actor = { version = "0.11.3-rc.5", path = "../db_views_actor" } +lemmy_api_common = { version = "0.11.3-rc.5", path = "../api_common" } +lemmy_websocket = { version = "0.11.3-rc.5", path = "../websocket" } diesel = "1.4.7" bcrypt = "0.10.0" chrono = { version = "0.4.19", features = ["serde"] } diff --git a/crates/api_common/Cargo.toml b/crates/api_common/Cargo.toml index e68793b52..9a00e6b8e 100644 --- a/crates/api_common/Cargo.toml +++ b/crates/api_common/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "lemmy_api_common" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [lib] name = "lemmy_api_common" @@ -9,12 +11,12 @@ path = "src/lib.rs" doctest = false [dependencies] -lemmy_db_queries = { path = "../db_queries" } -lemmy_db_views = { path = "../db_views" } -lemmy_db_views_moderator = { path = "../db_views_moderator" } -lemmy_db_views_actor = { path = "../db_views_actor" } -lemmy_db_schema = { path = "../db_schema" } -lemmy_utils = { path = "../utils" } +lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } +lemmy_db_views = { version = "0.11.3-rc.5", path = "../db_views" } +lemmy_db_views_moderator = { version = "0.11.3-rc.5", path = "../db_views_moderator" } +lemmy_db_views_actor = { version = "0.11.3-rc.5", path = "../db_views_actor" } +lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } +lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } serde = { version = "1.0.126", features = ["derive"] } log = "0.4.14" diesel = "1.4.7" diff --git a/crates/api_crud/Cargo.toml b/crates/api_crud/Cargo.toml index e64d50b11..ee88aaf05 100644 --- a/crates/api_crud/Cargo.toml +++ b/crates/api_crud/Cargo.toml @@ -1,18 +1,20 @@ [package] name = "lemmy_api_crud" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [dependencies] -lemmy_apub = { path = "../apub" } -lemmy_utils = { path = "../utils" } -lemmy_db_queries = { path = "../db_queries" } -lemmy_db_schema = { path = "../db_schema" } -lemmy_db_views = { path = "../db_views" } -lemmy_db_views_moderator = { path = "../db_views_moderator" } -lemmy_db_views_actor = { path = "../db_views_actor" } -lemmy_api_common = { path = "../api_common" } -lemmy_websocket = { path = "../websocket" } +lemmy_apub = { version = "0.11.3-rc.5", path = "../apub" } +lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } +lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } +lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } +lemmy_db_views = { version = "0.11.3-rc.5", path = "../db_views" } +lemmy_db_views_moderator = { version = "0.11.3-rc.5", path = "../db_views_moderator" } +lemmy_db_views_actor = { version = "0.11.3-rc.5", path = "../db_views_actor" } +lemmy_api_common = { version = "0.11.3-rc.5", path = "../api_common" } +lemmy_websocket = { version = "0.11.3-rc.5", path = "../websocket" } diesel = "1.4.7" bcrypt = "0.10.0" chrono = { version = "0.4.19", features = ["serde"] } diff --git a/crates/apub/Cargo.toml b/crates/apub/Cargo.toml index 40cab9903..88e5cbbb1 100644 --- a/crates/apub/Cargo.toml +++ b/crates/apub/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "lemmy_apub" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [lib] name = "lemmy_apub" @@ -9,14 +11,14 @@ path = "src/lib.rs" doctest = false [dependencies] -lemmy_utils = { path = "../utils" } -lemmy_apub_lib = { path = "../apub_lib" } -lemmy_db_queries = { path = "../db_queries" } -lemmy_db_schema = { path = "../db_schema" } -lemmy_db_views = { path = "../db_views" } -lemmy_db_views_actor = { path = "../db_views_actor" } -lemmy_api_common = { path = "../api_common" } -lemmy_websocket = { path = "../websocket" } +lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } +lemmy_apub_lib = { version = "0.11.3-rc.5", path = "../apub_lib" } +lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } +lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } +lemmy_db_views = { version = "0.11.3-rc.5", path = "../db_views" } +lemmy_db_views_actor = { version = "0.11.3-rc.5", path = "../db_views_actor" } +lemmy_api_common = { version = "0.11.3-rc.5", path = "../api_common" } +lemmy_websocket = { version = "0.11.3-rc.5", path = "../websocket" } diesel = "1.4.7" activitystreams = "0.7.0-alpha.11" activitystreams-ext = "0.1.0-alpha.2" diff --git a/crates/apub_lib/Cargo.toml b/crates/apub_lib/Cargo.toml index 6f8c84170..f15a12ade 100644 --- a/crates/apub_lib/Cargo.toml +++ b/crates/apub_lib/Cargo.toml @@ -1,12 +1,14 @@ [package] name = "lemmy_apub_lib" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [dependencies] -lemmy_utils = { path = "../utils" } -lemmy_websocket = { path = "../websocket" } -lemmy_apub_lib_derive = { path = "../apub_lib_derive" } +lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } +lemmy_websocket = { version = "0.11.3-rc.5", path = "../websocket" } +lemmy_apub_lib_derive = { version = "0.11.3-rc.5", path = "../apub_lib_derive" } activitystreams = "0.7.0-alpha.11" activitystreams-ext = "0.1.0-alpha.2" serde = { version = "1.0.123", features = ["derive"] } diff --git a/crates/apub_lib_derive/Cargo.toml b/crates/apub_lib_derive/Cargo.toml index 293a15b8c..5071fddf1 100644 --- a/crates/apub_lib_derive/Cargo.toml +++ b/crates/apub_lib_derive/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "lemmy_apub_lib_derive" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [lib] proc-macro = true @@ -12,4 +14,4 @@ trybuild = { version = "1.0", features = ["diff"] } [dependencies] proc-macro2 = "1.0" syn = "1.0" -quote = "1.0" \ No newline at end of file +quote = "1.0" diff --git a/crates/db_queries/Cargo.toml b/crates/db_queries/Cargo.toml index 1fa57ef84..29fbe1c52 100644 --- a/crates/db_queries/Cargo.toml +++ b/crates/db_queries/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "lemmy_db_queries" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [lib] name = "lemmy_db_queries" @@ -9,8 +11,8 @@ path = "src/lib.rs" doctest = false [dependencies] -lemmy_utils = { path = "../utils" } -lemmy_db_schema = { path = "../db_schema" } +lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } +lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } diesel = { version = "1.4.7", features = ["postgres","chrono","r2d2","serde_json"] } diesel_migrations = "1.4.0" chrono = { version = "0.4.19", features = ["serde"] } diff --git a/crates/db_schema/Cargo.toml b/crates/db_schema/Cargo.toml index 1f4fb7eca..ad6b9aa25 100644 --- a/crates/db_schema/Cargo.toml +++ b/crates/db_schema/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "lemmy_db_schema" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [lib] doctest = false diff --git a/crates/db_views/Cargo.toml b/crates/db_views/Cargo.toml index 1171684fe..04e29214b 100644 --- a/crates/db_views/Cargo.toml +++ b/crates/db_views/Cargo.toml @@ -1,14 +1,16 @@ [package] name = "lemmy_db_views" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [lib] doctest = false [dependencies] -lemmy_db_queries = { path = "../db_queries" } -lemmy_db_schema = { path = "../db_schema" } +lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } +lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } diesel = { version = "1.4.7", features = ["postgres","chrono","r2d2","serde_json"] } serde = { version = "1.0.126", features = ["derive"] } log = "0.4.14" diff --git a/crates/db_views_actor/Cargo.toml b/crates/db_views_actor/Cargo.toml index a38202cf7..03e31c105 100644 --- a/crates/db_views_actor/Cargo.toml +++ b/crates/db_views_actor/Cargo.toml @@ -1,13 +1,15 @@ [package] name = "lemmy_db_views_actor" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [lib] doctest = false [dependencies] -lemmy_db_queries = { path = "../db_queries" } -lemmy_db_schema = { path = "../db_schema" } +lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } +lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } diesel = { version = "1.4.7", features = ["postgres","chrono","r2d2","serde_json"] } serde = { version = "1.0.126", features = ["derive"] } diff --git a/crates/db_views_moderator/Cargo.toml b/crates/db_views_moderator/Cargo.toml index 5ecd1b1e8..fc650f450 100644 --- a/crates/db_views_moderator/Cargo.toml +++ b/crates/db_views_moderator/Cargo.toml @@ -1,13 +1,15 @@ [package] name = "lemmy_db_views_moderator" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [lib] doctest = false [dependencies] -lemmy_db_queries = { path = "../db_queries" } -lemmy_db_schema = { path = "../db_schema" } +lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } +lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } diesel = { version = "1.4.7", features = ["postgres","chrono","r2d2","serde_json"] } serde = { version = "1.0.126", features = ["derive"] } diff --git a/crates/routes/Cargo.toml b/crates/routes/Cargo.toml index bd79d7141..f7709bed2 100644 --- a/crates/routes/Cargo.toml +++ b/crates/routes/Cargo.toml @@ -1,19 +1,21 @@ [package] name = "lemmy_routes" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [lib] doctest = false [dependencies] -lemmy_utils = { path = "../utils" } -lemmy_websocket = { path = "../websocket" } -lemmy_db_queries = { path = "../db_queries" } -lemmy_db_views = { path = "../db_views" } -lemmy_db_views_actor = { path = "../db_views_actor" } -lemmy_db_schema = { path = "../db_schema" } -lemmy_api_common = { path = "../api_common" } +lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } +lemmy_websocket = { version = "0.11.3-rc.5", path = "../websocket" } +lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } +lemmy_db_views = { version = "0.11.3-rc.5", path = "../db_views" } +lemmy_db_views_actor = { version = "0.11.3-rc.5", path = "../db_views_actor" } +lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } +lemmy_api_common = { version = "0.11.3-rc.5", path = "../api_common" } diesel = "1.4.7" actix = "0.12.0" actix-web = { version = "4.0.0-beta.8", default-features = false, features = ["rustls"] } diff --git a/crates/utils/Cargo.toml b/crates/utils/Cargo.toml index 46921eca5..ce12c80d2 100644 --- a/crates/utils/Cargo.toml +++ b/crates/utils/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "lemmy_utils" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [lib] name = "lemmy_utils" diff --git a/crates/websocket/Cargo.toml b/crates/websocket/Cargo.toml index 5606279c8..3ce9b420f 100644 --- a/crates/websocket/Cargo.toml +++ b/crates/websocket/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "lemmy_websocket" -version = "0.1.0" +version = "0.11.3-rc.5" edition = "2018" +description = "A link aggregator for the fediverse" +license = "AGPL-3.0" [lib] name = "lemmy_websocket" @@ -9,10 +11,10 @@ path = "src/lib.rs" doctest = false [dependencies] -lemmy_utils = { path = "../utils" } -lemmy_api_common = { path = "../api_common" } -lemmy_db_queries = { path = "../db_queries" } -lemmy_db_schema = { path = "../db_schema" } +lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } +lemmy_api_common = { version = "0.11.3-rc.5", path = "../api_common" } +lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } +lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } reqwest = { version = "0.11.4", features = ["json"] } log = "0.4.14" rand = "0.8.4" diff --git a/scripts/cargo-publish.sh b/scripts/cargo-publish.sh new file mode 100755 index 000000000..be4171eaa --- /dev/null +++ b/scripts/cargo-publish.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -e +# This script relies on https://github.com/pksunkara/cargo-workspaces + +OLD_VERSION=0.11.3-rc.4 +NEW_VERSION=0.11.3-rc.5 +ROOT=$(pwd) +for DIR in crates/*; do + cd $DIR + pwd + sed -i "s/{ version = \"$OLD_VERSION\", path/{ version = \"$NEW_VERSION\", path/g" Cargo.toml + cd $ROOT +done +sed -i "s/{ version = \"$OLD_VERSION\", path/{ version = \"$NEW_VERSION\", path/g" Cargo.toml + +cp -r migrations crates/db_queries/ +cargo workspace publish --no-git-commit --allow-dirty --skip-published custom "$NEW_VERSION" +rm -r crates/db_queries/migrations/ \ No newline at end of file From a44b5c9c360abc40a4f77cade03b5c2a0df1ddc0 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 9 Aug 2021 17:37:06 +0200 Subject: [PATCH 2/2] publish to crates.io with normal release script --- .drone.yml | 11 ++++++++++ Cargo.lock | 30 ++++++++++++++-------------- Cargo.toml | 26 ++++++++++++------------ crates/api/Cargo.toml | 20 +++++++++---------- crates/api_common/Cargo.toml | 14 ++++++------- crates/api_crud/Cargo.toml | 20 +++++++++---------- crates/apub/Cargo.toml | 18 ++++++++--------- crates/apub_lib/Cargo.toml | 8 ++++---- crates/apub_lib_derive/Cargo.toml | 2 +- crates/db_queries/Cargo.toml | 6 +++--- crates/db_schema/Cargo.toml | 2 +- crates/db_views/Cargo.toml | 6 +++--- crates/db_views_actor/Cargo.toml | 6 +++--- crates/db_views_moderator/Cargo.toml | 6 +++--- crates/routes/Cargo.toml | 16 +++++++-------- crates/utils/Cargo.toml | 2 +- crates/websocket/Cargo.toml | 10 +++++----- docker/prod/deploy.sh | 16 +++++++++++++++ scripts/cargo-publish.sh | 18 ----------------- 19 files changed, 123 insertions(+), 114 deletions(-) delete mode 100755 scripts/cargo-publish.sh diff --git a/.drone.yml b/.drone.yml index c49790d9b..7d75fcbd5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -120,6 +120,17 @@ steps: ref: - refs/tags/* + # using https://github.com/pksunkara/cargo-workspaces + - name: publish to crates.io + image: rust:1.51-slim-buster + commands: + - cargo install cargo-workspaces + - cp -r migrations crates/db_queries/ + - cargo workspaces publish --no-git-commit --allow-branch main --yes custom "${DRONE_TAG}" + when: + ref: + - refs/tags/* + services: - name: database image: postgres:12-alpine diff --git a/Cargo.lock b/Cargo.lock index ec4e7dc73..146b72e74 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1550,7 +1550,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lemmy_api" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "actix", "actix-rt", @@ -1595,7 +1595,7 @@ dependencies = [ [[package]] name = "lemmy_api_common" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "actix-web", "chrono", @@ -1614,7 +1614,7 @@ dependencies = [ [[package]] name = "lemmy_api_crud" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "actix", "actix-rt", @@ -1658,7 +1658,7 @@ dependencies = [ [[package]] name = "lemmy_apub" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "activitystreams", "activitystreams-ext", @@ -1706,7 +1706,7 @@ dependencies = [ [[package]] name = "lemmy_apub_lib" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "activitystreams", "activitystreams-ext", @@ -1721,7 +1721,7 @@ dependencies = [ [[package]] name = "lemmy_apub_lib_derive" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "proc-macro2 1.0.27", "quote 1.0.9", @@ -1731,7 +1731,7 @@ dependencies = [ [[package]] name = "lemmy_db_queries" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "bcrypt", "chrono", @@ -1753,7 +1753,7 @@ dependencies = [ [[package]] name = "lemmy_db_schema" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "chrono", "diesel", @@ -1766,7 +1766,7 @@ dependencies = [ [[package]] name = "lemmy_db_views" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "diesel", "lemmy_db_queries", @@ -1779,7 +1779,7 @@ dependencies = [ [[package]] name = "lemmy_db_views_actor" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "diesel", "lemmy_db_queries", @@ -1789,7 +1789,7 @@ dependencies = [ [[package]] name = "lemmy_db_views_moderator" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "diesel", "lemmy_db_queries", @@ -1799,7 +1799,7 @@ dependencies = [ [[package]] name = "lemmy_routes" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "actix", "actix-web", @@ -1826,7 +1826,7 @@ dependencies = [ [[package]] name = "lemmy_server" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "activitystreams", "actix", @@ -1864,7 +1864,7 @@ dependencies = [ [[package]] name = "lemmy_utils" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "actix-rt", "actix-web", @@ -1897,7 +1897,7 @@ dependencies = [ [[package]] name = "lemmy_websocket" -version = "0.11.3-rc.5" +version = "0.11.3" dependencies = [ "actix", "actix-web", diff --git a/Cargo.toml b/Cargo.toml index 8ce03dbe8..5cf815404 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemmy_server" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" homepage = "https://join-lemmy.org/" @@ -32,18 +32,18 @@ members = [ ] [dependencies] -lemmy_api = { version = "0.11.3-rc.5", path = "./crates/api" } -lemmy_api_crud = { version = "0.11.3-rc.5", path = "./crates/api_crud" } -lemmy_apub = { version = "0.11.3-rc.5", path = "./crates/apub" } -lemmy_utils = { version = "0.11.3-rc.5", path = "./crates/utils" } -lemmy_db_schema = { version = "0.11.3-rc.5", path = "./crates/db_schema" } -lemmy_db_queries = { version = "0.11.3-rc.5", path = "./crates/db_queries" } -lemmy_db_views = { version = "0.11.3-rc.5", path = "./crates/db_views" } -lemmy_db_views_moderator = { version = "0.11.3-rc.5", path = "./crates/db_views_moderator" } -lemmy_db_views_actor = { version = "0.11.3-rc.5", path = "./crates/db_views_actor" } -lemmy_api_common = { version = "0.11.3-rc.5", path = "crates/api_common" } -lemmy_websocket = { version = "0.11.3-rc.5", path = "./crates/websocket" } -lemmy_routes = { version = "0.11.3-rc.5", path = "./crates/routes" } +lemmy_api = { version = "=0.11.3", path = "./crates/api" } +lemmy_api_crud = { version = "=0.11.3", path = "./crates/api_crud" } +lemmy_apub = { version = "=0.11.3", path = "./crates/apub" } +lemmy_utils = { version = "=0.11.3", path = "./crates/utils" } +lemmy_db_schema = { version = "=0.11.3", path = "./crates/db_schema" } +lemmy_db_queries = { version = "=0.11.3", path = "./crates/db_queries" } +lemmy_db_views = { version = "=0.11.3", path = "./crates/db_views" } +lemmy_db_views_moderator = { version = "=0.11.3", path = "./crates/db_views_moderator" } +lemmy_db_views_actor = { version = "=0.11.3", path = "./crates/db_views_actor" } +lemmy_api_common = { version = "=0.11.3", path = "crates/api_common" } +lemmy_websocket = { version = "=0.11.3", path = "./crates/websocket" } +lemmy_routes = { version = "=0.11.3", path = "./crates/routes" } diesel = "1.4.7" diesel_migrations = "1.4.0" chrono = { version = "0.4.19", features = ["serde"] } diff --git a/crates/api/Cargo.toml b/crates/api/Cargo.toml index 74f21df0b..f7adb99ef 100644 --- a/crates/api/Cargo.toml +++ b/crates/api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemmy_api" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" @@ -11,15 +11,15 @@ path = "src/lib.rs" doctest = false [dependencies] -lemmy_apub = { version = "0.11.3-rc.5", path = "../apub" } -lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } -lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } -lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } -lemmy_db_views = { version = "0.11.3-rc.5", path = "../db_views" } -lemmy_db_views_moderator = { version = "0.11.3-rc.5", path = "../db_views_moderator" } -lemmy_db_views_actor = { version = "0.11.3-rc.5", path = "../db_views_actor" } -lemmy_api_common = { version = "0.11.3-rc.5", path = "../api_common" } -lemmy_websocket = { version = "0.11.3-rc.5", path = "../websocket" } +lemmy_apub = { version = "=0.11.3", path = "../apub" } +lemmy_utils = { version = "=0.11.3", path = "../utils" } +lemmy_db_queries = { version = "=0.11.3", path = "../db_queries" } +lemmy_db_schema = { version = "=0.11.3", path = "../db_schema" } +lemmy_db_views = { version = "=0.11.3", path = "../db_views" } +lemmy_db_views_moderator = { version = "=0.11.3", path = "../db_views_moderator" } +lemmy_db_views_actor = { version = "=0.11.3", path = "../db_views_actor" } +lemmy_api_common = { version = "=0.11.3", path = "../api_common" } +lemmy_websocket = { version = "=0.11.3", path = "../websocket" } diesel = "1.4.7" bcrypt = "0.10.0" chrono = { version = "0.4.19", features = ["serde"] } diff --git a/crates/api_common/Cargo.toml b/crates/api_common/Cargo.toml index 9a00e6b8e..02d33f6fe 100644 --- a/crates/api_common/Cargo.toml +++ b/crates/api_common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemmy_api_common" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" @@ -11,12 +11,12 @@ path = "src/lib.rs" doctest = false [dependencies] -lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } -lemmy_db_views = { version = "0.11.3-rc.5", path = "../db_views" } -lemmy_db_views_moderator = { version = "0.11.3-rc.5", path = "../db_views_moderator" } -lemmy_db_views_actor = { version = "0.11.3-rc.5", path = "../db_views_actor" } -lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } -lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } +lemmy_db_queries = { version = "=0.11.3", path = "../db_queries" } +lemmy_db_views = { version = "=0.11.3", path = "../db_views" } +lemmy_db_views_moderator = { version = "=0.11.3", path = "../db_views_moderator" } +lemmy_db_views_actor = { version = "=0.11.3", path = "../db_views_actor" } +lemmy_db_schema = { version = "=0.11.3", path = "../db_schema" } +lemmy_utils = { version = "=0.11.3", path = "../utils" } serde = { version = "1.0.126", features = ["derive"] } log = "0.4.14" diesel = "1.4.7" diff --git a/crates/api_crud/Cargo.toml b/crates/api_crud/Cargo.toml index ee88aaf05..47746d0dd 100644 --- a/crates/api_crud/Cargo.toml +++ b/crates/api_crud/Cargo.toml @@ -1,20 +1,20 @@ [package] name = "lemmy_api_crud" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" [dependencies] -lemmy_apub = { version = "0.11.3-rc.5", path = "../apub" } -lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } -lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } -lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } -lemmy_db_views = { version = "0.11.3-rc.5", path = "../db_views" } -lemmy_db_views_moderator = { version = "0.11.3-rc.5", path = "../db_views_moderator" } -lemmy_db_views_actor = { version = "0.11.3-rc.5", path = "../db_views_actor" } -lemmy_api_common = { version = "0.11.3-rc.5", path = "../api_common" } -lemmy_websocket = { version = "0.11.3-rc.5", path = "../websocket" } +lemmy_apub = { version = "=0.11.3", path = "../apub" } +lemmy_utils = { version = "=0.11.3", path = "../utils" } +lemmy_db_queries = { version = "=0.11.3", path = "../db_queries" } +lemmy_db_schema = { version = "=0.11.3", path = "../db_schema" } +lemmy_db_views = { version = "=0.11.3", path = "../db_views" } +lemmy_db_views_moderator = { version = "=0.11.3", path = "../db_views_moderator" } +lemmy_db_views_actor = { version = "=0.11.3", path = "../db_views_actor" } +lemmy_api_common = { version = "=0.11.3", path = "../api_common" } +lemmy_websocket = { version = "=0.11.3", path = "../websocket" } diesel = "1.4.7" bcrypt = "0.10.0" chrono = { version = "0.4.19", features = ["serde"] } diff --git a/crates/apub/Cargo.toml b/crates/apub/Cargo.toml index 88e5cbbb1..1937dffd7 100644 --- a/crates/apub/Cargo.toml +++ b/crates/apub/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemmy_apub" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" @@ -11,14 +11,14 @@ path = "src/lib.rs" doctest = false [dependencies] -lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } -lemmy_apub_lib = { version = "0.11.3-rc.5", path = "../apub_lib" } -lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } -lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } -lemmy_db_views = { version = "0.11.3-rc.5", path = "../db_views" } -lemmy_db_views_actor = { version = "0.11.3-rc.5", path = "../db_views_actor" } -lemmy_api_common = { version = "0.11.3-rc.5", path = "../api_common" } -lemmy_websocket = { version = "0.11.3-rc.5", path = "../websocket" } +lemmy_utils = { version = "=0.11.3", path = "../utils" } +lemmy_apub_lib = { version = "=0.11.3", path = "../apub_lib" } +lemmy_db_queries = { version = "=0.11.3", path = "../db_queries" } +lemmy_db_schema = { version = "=0.11.3", path = "../db_schema" } +lemmy_db_views = { version = "=0.11.3", path = "../db_views" } +lemmy_db_views_actor = { version = "=0.11.3", path = "../db_views_actor" } +lemmy_api_common = { version = "=0.11.3", path = "../api_common" } +lemmy_websocket = { version = "=0.11.3", path = "../websocket" } diesel = "1.4.7" activitystreams = "0.7.0-alpha.11" activitystreams-ext = "0.1.0-alpha.2" diff --git a/crates/apub_lib/Cargo.toml b/crates/apub_lib/Cargo.toml index f15a12ade..7bc2f125e 100644 --- a/crates/apub_lib/Cargo.toml +++ b/crates/apub_lib/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "lemmy_apub_lib" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" [dependencies] -lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } -lemmy_websocket = { version = "0.11.3-rc.5", path = "../websocket" } -lemmy_apub_lib_derive = { version = "0.11.3-rc.5", path = "../apub_lib_derive" } +lemmy_utils = { version = "=0.11.3", path = "../utils" } +lemmy_websocket = { version = "=0.11.3", path = "../websocket" } +lemmy_apub_lib_derive = { version = "=0.11.3", path = "../apub_lib_derive" } activitystreams = "0.7.0-alpha.11" activitystreams-ext = "0.1.0-alpha.2" serde = { version = "1.0.123", features = ["derive"] } diff --git a/crates/apub_lib_derive/Cargo.toml b/crates/apub_lib_derive/Cargo.toml index 5071fddf1..3b1e2a9eb 100644 --- a/crates/apub_lib_derive/Cargo.toml +++ b/crates/apub_lib_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemmy_apub_lib_derive" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" diff --git a/crates/db_queries/Cargo.toml b/crates/db_queries/Cargo.toml index 29fbe1c52..61384ee28 100644 --- a/crates/db_queries/Cargo.toml +++ b/crates/db_queries/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemmy_db_queries" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" @@ -11,8 +11,8 @@ path = "src/lib.rs" doctest = false [dependencies] -lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } -lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } +lemmy_utils = { version = "=0.11.3", path = "../utils" } +lemmy_db_schema = { version = "=0.11.3", path = "../db_schema" } diesel = { version = "1.4.7", features = ["postgres","chrono","r2d2","serde_json"] } diesel_migrations = "1.4.0" chrono = { version = "0.4.19", features = ["serde"] } diff --git a/crates/db_schema/Cargo.toml b/crates/db_schema/Cargo.toml index ad6b9aa25..6bf5ac3cc 100644 --- a/crates/db_schema/Cargo.toml +++ b/crates/db_schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemmy_db_schema" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" diff --git a/crates/db_views/Cargo.toml b/crates/db_views/Cargo.toml index 04e29214b..f8395ce2f 100644 --- a/crates/db_views/Cargo.toml +++ b/crates/db_views/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemmy_db_views" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" @@ -9,8 +9,8 @@ license = "AGPL-3.0" doctest = false [dependencies] -lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } -lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } +lemmy_db_queries = { version = "=0.11.3", path = "../db_queries" } +lemmy_db_schema = { version = "=0.11.3", path = "../db_schema" } diesel = { version = "1.4.7", features = ["postgres","chrono","r2d2","serde_json"] } serde = { version = "1.0.126", features = ["derive"] } log = "0.4.14" diff --git a/crates/db_views_actor/Cargo.toml b/crates/db_views_actor/Cargo.toml index 03e31c105..bcd21e804 100644 --- a/crates/db_views_actor/Cargo.toml +++ b/crates/db_views_actor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemmy_db_views_actor" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" @@ -9,7 +9,7 @@ license = "AGPL-3.0" doctest = false [dependencies] -lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } -lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } +lemmy_db_queries = { version = "=0.11.3", path = "../db_queries" } +lemmy_db_schema = { version = "=0.11.3", path = "../db_schema" } diesel = { version = "1.4.7", features = ["postgres","chrono","r2d2","serde_json"] } serde = { version = "1.0.126", features = ["derive"] } diff --git a/crates/db_views_moderator/Cargo.toml b/crates/db_views_moderator/Cargo.toml index fc650f450..196e72c50 100644 --- a/crates/db_views_moderator/Cargo.toml +++ b/crates/db_views_moderator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemmy_db_views_moderator" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" @@ -9,7 +9,7 @@ license = "AGPL-3.0" doctest = false [dependencies] -lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } -lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } +lemmy_db_queries = { version = "=0.11.3", path = "../db_queries" } +lemmy_db_schema = { version = "=0.11.3", path = "../db_schema" } diesel = { version = "1.4.7", features = ["postgres","chrono","r2d2","serde_json"] } serde = { version = "1.0.126", features = ["derive"] } diff --git a/crates/routes/Cargo.toml b/crates/routes/Cargo.toml index f7709bed2..fbecda492 100644 --- a/crates/routes/Cargo.toml +++ b/crates/routes/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemmy_routes" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" @@ -9,13 +9,13 @@ license = "AGPL-3.0" doctest = false [dependencies] -lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } -lemmy_websocket = { version = "0.11.3-rc.5", path = "../websocket" } -lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } -lemmy_db_views = { version = "0.11.3-rc.5", path = "../db_views" } -lemmy_db_views_actor = { version = "0.11.3-rc.5", path = "../db_views_actor" } -lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } -lemmy_api_common = { version = "0.11.3-rc.5", path = "../api_common" } +lemmy_utils = { version = "=0.11.3", path = "../utils" } +lemmy_websocket = { version = "=0.11.3", path = "../websocket" } +lemmy_db_queries = { version = "=0.11.3", path = "../db_queries" } +lemmy_db_views = { version = "=0.11.3", path = "../db_views" } +lemmy_db_views_actor = { version = "=0.11.3", path = "../db_views_actor" } +lemmy_db_schema = { version = "=0.11.3", path = "../db_schema" } +lemmy_api_common = { version = "=0.11.3", path = "../api_common" } diesel = "1.4.7" actix = "0.12.0" actix-web = { version = "4.0.0-beta.8", default-features = false, features = ["rustls"] } diff --git a/crates/utils/Cargo.toml b/crates/utils/Cargo.toml index ce12c80d2..d4e15707c 100644 --- a/crates/utils/Cargo.toml +++ b/crates/utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemmy_utils" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" diff --git a/crates/websocket/Cargo.toml b/crates/websocket/Cargo.toml index 3ce9b420f..3571d0c32 100644 --- a/crates/websocket/Cargo.toml +++ b/crates/websocket/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemmy_websocket" -version = "0.11.3-rc.5" +version = "0.11.3" edition = "2018" description = "A link aggregator for the fediverse" license = "AGPL-3.0" @@ -11,10 +11,10 @@ path = "src/lib.rs" doctest = false [dependencies] -lemmy_utils = { version = "0.11.3-rc.5", path = "../utils" } -lemmy_api_common = { version = "0.11.3-rc.5", path = "../api_common" } -lemmy_db_queries = { version = "0.11.3-rc.5", path = "../db_queries" } -lemmy_db_schema = { version = "0.11.3-rc.5", path = "../db_schema" } +lemmy_utils = { version = "=0.11.3", path = "../utils" } +lemmy_api_common = { version = "=0.11.3", path = "../api_common" } +lemmy_db_queries = { version = "=0.11.3", path = "../db_queries" } +lemmy_db_schema = { version = "=0.11.3", path = "../db_schema" } reqwest = { version = "0.11.4", features = ["json"] } log = "0.4.14" rand = "0.8.4" diff --git a/docker/prod/deploy.sh b/docker/prod/deploy.sh index fd78b71a0..914e3bc40 100755 --- a/docker/prod/deploy.sh +++ b/docker/prod/deploy.sh @@ -2,6 +2,7 @@ #git checkout main # Creating the new tag +old_tag=$(cat "ansible/VERSION") new_tag="$1" third_semver=$(echo $new_tag | cut -d "." -f 3) @@ -19,6 +20,21 @@ if [ ! -z "${third_semver##*[!0-9]*}" ]; then popd fi +# Update crate versions for crates.io +for crate in crates/*; do + pushd $crate + # update version of the crate itself (only first occurence) + # https://stackoverflow.com/a/9453461 + sed -i "0,/version = \"$old_tag\"/s//version = \"$new_tag\"/g" Cargo.toml + # update version of lemmy dependencies + sed -i "s/{ version = \"=$old_tag\", path/{ version = \"=$new_tag\", path/g" Cargo.toml + popd +done +# same as above, for the main cargo.toml +sed -i "s/{ version = \"=$old_tag\", path/{ version = \"=$new_tag\", path/g" Cargo.toml +sed -i "s/version = \"$old_tag\"/version = \"$new_tag\"/g" Cargo.toml + + # The commit git commit -m"Version $new_tag" git tag $new_tag diff --git a/scripts/cargo-publish.sh b/scripts/cargo-publish.sh deleted file mode 100755 index be4171eaa..000000000 --- a/scripts/cargo-publish.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -set -e -# This script relies on https://github.com/pksunkara/cargo-workspaces - -OLD_VERSION=0.11.3-rc.4 -NEW_VERSION=0.11.3-rc.5 -ROOT=$(pwd) -for DIR in crates/*; do - cd $DIR - pwd - sed -i "s/{ version = \"$OLD_VERSION\", path/{ version = \"$NEW_VERSION\", path/g" Cargo.toml - cd $ROOT -done -sed -i "s/{ version = \"$OLD_VERSION\", path/{ version = \"$NEW_VERSION\", path/g" Cargo.toml - -cp -r migrations crates/db_queries/ -cargo workspace publish --no-git-commit --allow-dirty --skip-published custom "$NEW_VERSION" -rm -r crates/db_queries/migrations/ \ No newline at end of file