From 0c83ffde2aebb0d5c5af5a69c477359f752124b3 Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Fri, 11 Dec 2020 19:20:05 -1000 Subject: [PATCH] Fix release replacements. (#825) Some crates need to rewrite values when they are released in other crates. It turns out, by default we use a general config _build/release.toml. So it turns out these local-to-the-crate release.tomls were not being used unless explicitly chosen in the local-to-the-crate Makefile.toml. This removes the dead release.tomls and overrides the ones that need to edit other crates on release. --- _build/release.toml | 1 - juniper/release.toml | 1 - juniper_codegen/release.toml | 1 - juniper_graphql_ws/Makefile.toml | 12 ++++++++++++ juniper_graphql_ws/release.toml | 1 - juniper_hyper/release.toml | 8 -------- juniper_iron/release.toml | 8 -------- juniper_rocket/release.toml | 8 -------- juniper_rocket_async/release.toml | 8 -------- juniper_subscriptions/Makefile.toml | 12 ++++++++++++ juniper_subscriptions/release.toml | 3 +-- juniper_warp/release.toml | 8 -------- 12 files changed, 25 insertions(+), 46 deletions(-) delete mode 100644 juniper_hyper/release.toml delete mode 100644 juniper_iron/release.toml delete mode 100644 juniper_rocket/release.toml delete mode 100644 juniper_rocket_async/release.toml delete mode 100644 juniper_warp/release.toml diff --git a/_build/release.toml b/_build/release.toml index 6aadd80b..bf2001ff 100644 --- a/_build/release.toml +++ b/_build/release.toml @@ -2,7 +2,6 @@ no-dev-version = true pre-release-commit-message = "Release {{crate_name}} {{version}}" pro-release-commit-message = "Bump {{crate_name}} version to {{next_version}}" tag-message = "Release {{crate_name}} {{version}}" -upload-doc = false pre-release-replacements = [ {file="CHANGELOG.md", search="# master", replace="# master\n\n- Compatibility with the latest `juniper`.\n\n# [[{{version}}] {{date}}](https://github.com/graphql-rust/juniper/releases/tag/{{crate_name}}-{{version}})"}, ] diff --git a/juniper/release.toml b/juniper/release.toml index ab15f4e5..2dfe5da2 100644 --- a/juniper/release.toml +++ b/juniper/release.toml @@ -2,7 +2,6 @@ no-dev-version = true pre-release-commit-message = "Release {{crate_name}} {{version}}" pro-release-commit-message = "Bump {{crate_name}} version to {{next_version}}" tag-message = "Release {{crate_name}} {{version}}" -upload-doc = false pre-release-replacements = [ # Juniper's changelog {file="CHANGELOG.md", search="# master", replace="# master\n\n- No changes yet\n\n# [[{{version}}] {{date}}](https://github.com/graphql-rust/juniper/releases/tag/{{crate_name}}-{{version}})"}, diff --git a/juniper_codegen/release.toml b/juniper_codegen/release.toml index 1a4522d6..4bdd16f3 100644 --- a/juniper_codegen/release.toml +++ b/juniper_codegen/release.toml @@ -2,7 +2,6 @@ no-dev-version = true pre-release-commit-message = "Release {{crate_name}} {{version}}" pro-release-commit-message = "Bump {{crate_name}} version to {{next_version}}" tag-message = "Release {{crate_name}} {{version}}" -upload-doc = false pre-release-replacements = [ {file="../juniper/Cargo.toml", search="juniper_codegen = \\{ version = \"[^\"]+\"", replace="juniper_codegen = { version = \"{{version}}\""}, {file="src/lib.rs", search="docs.rs/juniper_codegen/[a-z0-9\\.-]+", replace="docs.rs/juniper_codegen/{{version}}"}, diff --git a/juniper_graphql_ws/Makefile.toml b/juniper_graphql_ws/Makefile.toml index ba858470..f02afcf8 100644 --- a/juniper_graphql_ws/Makefile.toml +++ b/juniper_graphql_ws/Makefile.toml @@ -1,3 +1,15 @@ +# This is needed as the release config is at a different path than the top-level +# release config. + +[tasks.release-INTERNAL] +args = ["release", "--config", "${CARGO_MAKE_WORKING_DIRECTORY}/release.toml", "${RELEASE_LEVEL}"] + +[tasks.release-dry-run-INTERNAL] +args = ["release", "--config", "${CARGO_MAKE_WORKING_DIRECTORY}/release.toml", "--dry-run", "${RELEASE_LEVEL}"] + +[tasks.release-local-test-INTERNAL] +args = ["release", "--config", "${CARGO_MAKE_WORKING_DIRECTORY}/release.toml", "--no-confirm", "--skip-publish", "--skip-push", "--skip-tag", "${RELEASE_LEVEL}"] + [env] CARGO_MAKE_CARGO_ALL_FEATURES = "" diff --git a/juniper_graphql_ws/release.toml b/juniper_graphql_ws/release.toml index 5f365b79..ae2a9e28 100644 --- a/juniper_graphql_ws/release.toml +++ b/juniper_graphql_ws/release.toml @@ -2,7 +2,6 @@ no-dev-version = true pre-release-commit-message = "Release {{crate_name}} {{version}}" pro-release-commit-message = "Bump {{crate_name}} version to {{next_version}}" tag-message = "Release {{crate_name}} {{version}}" -upload-doc = false pre-release-replacements = [ {file="src/lib.rs", search="docs.rs/juniper_graphql_ws/[a-z0-9\\.-]+", replace="docs.rs/juniper_graphql_ws/{{version}}"}, {file="../juniper_warp/Cargo.toml", search="juniper_graphql_ws = \\{ version = \"[^\"]+\"", replace="juniper_graphql_ws = { version = \"{{version}}\""}, diff --git a/juniper_hyper/release.toml b/juniper_hyper/release.toml deleted file mode 100644 index b8a63273..00000000 --- a/juniper_hyper/release.toml +++ /dev/null @@ -1,8 +0,0 @@ -no-dev-version = true -pre-release-commit-message = "Release {{crate_name}} {{version}}" -pro-release-commit-message = "Bump {{crate_name}} version to {{next_version}}" -tag-message = "Release {{crate_name}} {{version}}" -upload-doc = false -pre-release-replacements = [ - {file="src/lib.rs", search="docs.rs/juniper_hyper/[a-z0-9\\.-]+", replace="docs.rs/juniper_hyper/{{version}}"}, -] diff --git a/juniper_iron/release.toml b/juniper_iron/release.toml deleted file mode 100644 index f99799c6..00000000 --- a/juniper_iron/release.toml +++ /dev/null @@ -1,8 +0,0 @@ -no-dev-version = true -pre-release-commit-message = "Release {{crate_name}} {{version}}" -pro-release-commit-message = "Bump {{crate_name}} version to {{next_version}}" -tag-message = "Release {{crate_name}} {{version}}" -upload-doc = false -pre-release-replacements = [ - {file="src/lib.rs", search="docs.rs/juniper_iron/[a-z0-9\\.-]+", replace="docs.rs/juniper_iron/{{version}}"}, -] diff --git a/juniper_rocket/release.toml b/juniper_rocket/release.toml deleted file mode 100644 index 0145d187..00000000 --- a/juniper_rocket/release.toml +++ /dev/null @@ -1,8 +0,0 @@ -no-dev-version = true -pre-release-commit-message = "Release {{crate_name}} {{version}}" -pro-release-commit-message = "Bump {{crate_name}} version to {{next_version}}" -tag-message = "Release {{crate_name}} {{version}}" -upload-doc = false -pre-release-replacements = [ - {file="src/lib.rs", search="docs.rs/juniper_rocket/[a-z0-9\\.-]+", replace="docs.rs/juniper_rocket/{{version}}"}, -] diff --git a/juniper_rocket_async/release.toml b/juniper_rocket_async/release.toml deleted file mode 100644 index 0145d187..00000000 --- a/juniper_rocket_async/release.toml +++ /dev/null @@ -1,8 +0,0 @@ -no-dev-version = true -pre-release-commit-message = "Release {{crate_name}} {{version}}" -pro-release-commit-message = "Bump {{crate_name}} version to {{next_version}}" -tag-message = "Release {{crate_name}} {{version}}" -upload-doc = false -pre-release-replacements = [ - {file="src/lib.rs", search="docs.rs/juniper_rocket/[a-z0-9\\.-]+", replace="docs.rs/juniper_rocket/{{version}}"}, -] diff --git a/juniper_subscriptions/Makefile.toml b/juniper_subscriptions/Makefile.toml index 16c540d4..fdb2121c 100644 --- a/juniper_subscriptions/Makefile.toml +++ b/juniper_subscriptions/Makefile.toml @@ -1,4 +1,16 @@ +# This is needed as the release config is at a different path than the top-level +# release config. + +[tasks.release-INTERNAL] +args = ["release", "--config", "${CARGO_MAKE_WORKING_DIRECTORY}/release.toml", "${RELEASE_LEVEL}"] + +[tasks.release-dry-run-INTERNAL] +args = ["release", "--config", "${CARGO_MAKE_WORKING_DIRECTORY}/release.toml", "--dry-run", "${RELEASE_LEVEL}"] + +[tasks.release-local-test-INTERNAL] +args = ["release", "--config", "${CARGO_MAKE_WORKING_DIRECTORY}/release.toml", "--no-confirm", "--skip-publish", "--skip-push", "--skip-tag", "${RELEASE_LEVEL}"] + [env] CARGO_MAKE_CARGO_ALL_FEATURES = "" diff --git a/juniper_subscriptions/release.toml b/juniper_subscriptions/release.toml index b23d8803..f0fa9479 100644 --- a/juniper_subscriptions/release.toml +++ b/juniper_subscriptions/release.toml @@ -2,8 +2,7 @@ no-dev-version = true pre-release-commit-message = "Release {{crate_name}} {{version}}" pro-release-commit-message = "Bump {{crate_name}} version to {{next_version}}" tag-message = "Release {{crate_name}} {{version}}" -upload-doc = false pre-release-replacements = [ - {file="src/lib.rs", search="docs.rs/juniper_subscriptions/[a-z0-9\\.-]+", replace="docs.rs/juniper_subscriptions/{{version}}"}, {file="../juniper_graphql_ws/Cargo.toml", search="juniper_subscriptions = \\{ version = \"[^\"]+\"", replace="juniper_subscriptions = { version = \"{{version}}\""}, + {file="src/lib.rs", search="docs.rs/juniper_subscriptions/[a-z0-9\\.-]+", replace="docs.rs/juniper_subscriptions/{{version}}"}, ] diff --git a/juniper_warp/release.toml b/juniper_warp/release.toml deleted file mode 100644 index c48eae8b..00000000 --- a/juniper_warp/release.toml +++ /dev/null @@ -1,8 +0,0 @@ -no-dev-version = true -pre-release-commit-message = "Release {{crate_name}} {{version}}" -pro-release-commit-message = "Bump {{crate_name}} version to {{next_version}}" -tag-message = "Release {{crate_name}} {{version}}" -upload-doc = false -pre-release-replacements = [ - {file="src/lib.rs", search="docs.rs/juniper_warp/[a-z0-9\\.-]+", replace="docs.rs/juniper_warp/{{version}}"}, -]