about summary refs log tree commit diff
path: root/ops
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-05-19T09·16+0300
committertazjin <tazjin@tvl.su>2023-05-19T09·23+0000
commite9efa579a7c9d6d43d96465310e25aab137af24e (patch)
tree4a4280db31353121e466503eeeb9fadf58801a8b /ops
parente31008db14054cc884ec2f8f4f7f5a07872fa398 (diff)
docs(ops/yandex-cloud-rs): add developer-facing README r/6167
Mostly to remind myself about the wonky release process.

Change-Id: I76ea8d9a2ed600ebb31f4b1a5368f3cefa0556d6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8598
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'ops')
-rw-r--r--ops/yandex-cloud-rs/Cargo.toml2
-rw-r--r--ops/yandex-cloud-rs/README.md51
2 files changed, 53 insertions, 0 deletions
diff --git a/ops/yandex-cloud-rs/Cargo.toml b/ops/yandex-cloud-rs/Cargo.toml
index c476421dc7..4ba1ea94a8 100644
--- a/ops/yandex-cloud-rs/Cargo.toml
+++ b/ops/yandex-cloud-rs/Cargo.toml
@@ -3,6 +3,8 @@ name = "yandex-cloud"
 description = "Generated gRPC clients for the Yandex Cloud API"
 version = "2023.4.24"
 edition = "2021"
+homepage = "https://cs.tvl.fyi/depot/-/tree/ops/yandex-cloud-rs"
+repository = "https://code.tvl.fyi/depot.git:/ops/yandex-cloud-rs.git"
 
 [dependencies]
 prost = "0.11"
diff --git a/ops/yandex-cloud-rs/README.md b/ops/yandex-cloud-rs/README.md
new file mode 100644
index 0000000000..76d80c760e
--- /dev/null
+++ b/ops/yandex-cloud-rs/README.md
@@ -0,0 +1,51 @@
+yandex-cloud-rs
+===============
+
+Client library for Yandex Cloud gRPC APIs, as published in their
+[GitHub repository][repo].
+
+Please see the [online documentation][docs] for user-facing
+information, this README is intended for library developers.
+
+The source code of the library lives [in the TVL repository][code].
+
+-------------
+
+In order to build this library, the gRPC API definitions need to be
+fetched from GitHub. By default this is done by Nix (see
+`default.nix`), which then injects the location of the API definitions
+through the `YANDEX_CLOUD_PROTOS` environment variable.
+
+The actual code generation happens through the calls in `build.rs`.
+
+Releases of this library are done from *dirty* trees, meaning that the
+version on crates.io should already contain all the generated code. In
+order to do this, after bumping the version in `Cargo.toml` and the
+API commit in `default.nix`, the following release procedure should be
+used:
+
+```
+# Get rid of all generated source files
+cd src
+ls | grep -v '^lib.rs$' | xargs rm
+cd ..
+
+# Get rid of all old artefacts
+cargo clean
+
+# Verify that a clean build works as intended
+cargo build
+
+# Verify that all documentation builds, and verify that it looks fine:
+#
+# - Is the version correct (current date)?
+# - Are all the services included (i.e. not an accidental empty build)?
+cargo doc --open
+
+# If everything looks fine, release:
+cargo publish --allow-dirty
+```
+
+[repo]: https://github.com/yandex-cloud/cloudapi
+[docs]: https://docs.rs/yandex-cloud/latest/yandex_cloud/
+[code]: https://cs.tvl.fyi/depot/-/tree/ops/yandex-cloud-rs