Skip to content

Commit

Permalink
fixup rust publishing (#223)
Browse files Browse the repository at this point in the history
* fixup rust publishing

Signed-off-by: William Woodruff <[email protected]>

* remove a spurious cargo exec

Signed-off-by: William Woodruff <[email protected]>

---------

Signed-off-by: William Woodruff <[email protected]>
  • Loading branch information
woodruffw authored Feb 12, 2024
1 parent af51495 commit 0813796
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 28 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/rust-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- run: make rust RUST_ACTION=publish
- run: |
cd gen/pb-rust
cargo publish -p sigstore_protobuf_specs
env:
CARGO_REGISTRY_TOKEN: "${{ secrets.CARGO_REGISTRY_TOKEN }}"
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ jsonschema: docker-image-jsonschema
-c "cd defs/gen/jsonschema && ./jsonschema.sh -I ../../protos -I /googleapis/ --jsonschema_out=schemas ../../protos/*.proto"

rust: docker-image
@echo "Running `cargo ${RUST_ACTION}`"
docker run \
--platform linux/amd64 \
-v ${PWD}:/defs \
Expand Down
18 changes: 9 additions & 9 deletions gen/pb-rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gen/pb-rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
resolver = "2"
members = [
"sigstore-protobuf-specs",
"derive"
"sigstore-protobuf-specs-derive"
]
13 changes: 0 additions & 13 deletions gen/pb-rust/derive/Cargo.toml

This file was deleted.

18 changes: 18 additions & 0 deletions gen/pb-rust/sigstore-protobuf-specs-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "sigstore-protobuf-specs-derive"
version = "0.0.1"
edition = "2021"
authors = ["Sigstore Authors <[email protected]>"]
homepage = "https://github.com/sigstore/protobuf-specs"
repository = "https://github.com/sigstore/protobuf-specs"
description = "Derive macros for sigstore-protobuf-specs. This is an implementation detail, you do not need this dependency."
readme = "README.md"
license-file = "LICENSE"
keywords = ["sigstore"]

[dependencies]
syn = "2.0"
quote = "1.0"

[lib]
proc-macro = true
File renamed without changes.
3 changes: 1 addition & 2 deletions gen/pb-rust/sigstore-protobuf-specs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[package]
name = "sigstore_protobuf_specs"
version = "0.3.0"
exclude = ["codegen/"]
authors = ["Sigstore Authors <[email protected]>"]
edition = "2021"
homepage = "https://github.com/sigstore/protobuf-specs"
Expand All @@ -18,7 +17,7 @@ prost = "0.12.3"
prost-reflect = { version = "0.12.0", features = ["serde", "derive"] }
serde = {version = "1.0", features = ["derive"]}
serde_json = "1.0"
derive = { path = "../derive" }
sigstore-protobuf-specs-derive = { version = "0.0.1", path = "../sigstore-protobuf-specs-derive" }

[build-dependencies]
anyhow = "1.0.72"
Expand Down
2 changes: 1 addition & 1 deletion gen/pb-rust/sigstore-protobuf-specs/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn main() -> anyhow::Result<()> {
.include_file("mod.rs")
.type_attribute(
".",
"#[derive(derive::Deserialize_proto, derive::Serialize_proto)]",
"#[derive(sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto)]",
)
// Disable problematic comments interpreted as doctests.
.disable_comments([".io.intoto.Envelope"]);
Expand Down

0 comments on commit 0813796

Please sign in to comment.