Skip to content

Commit

Permalink
Fix dependency ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
nicovank committed May 10, 2024
1 parent e27c9b0 commit c6ec0d6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
- name: Publish to crates.io
run: |
cargo login ${{ secrets.CRATES_IO_API_TOKEN }}
cargo publish -p chatdbg --allow-dirty
cargo publish -p chatdbg_macros --allow-dirty
cargo publish -p chatdbg --allow-dirty
working-directory: rust-support

- name: Publish to PyPI
Expand Down
4 changes: 2 additions & 2 deletions rust-support/chatdbg/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chatdbg"
version = "0.0.0" # Sync with pyproject.toml on release.
version = "##VERSION##" # Sync with pyproject.toml on release.
edition = "2021"
description = "Rust-specific support for ChatDBG."
authors = ["Emery Berger <[email protected]>"]
Expand All @@ -10,5 +10,5 @@ homepage = "https://github.com/plasma-umass/ChatDBG/"
repository = "https://github.com/plasma-umass/ChatDBG/"

[dependencies]
chatdbg_macros = { path = "../chatdbg_macros" }
chatdbg_macros = "##VERSION##" # Sync with pyproject.toml on release.
lazy_static = "1.4.0"
2 changes: 1 addition & 1 deletion rust-support/chatdbg_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chatdbg_macros"
version = "0.0.0" # Sync with pyproject.toml on release.
version = "##VERSION##" # Sync with pyproject.toml on release.
edition = "2021"
description = "Rust-specific (macro) support for ChatDBG."
authors = ["Noah Lev Bartell-Mangel <[email protected]>"]
Expand Down
10 changes: 4 additions & 6 deletions rust-support/fill-crate-version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import tomllib
import re

DIRNAME = os.path.dirname(__file__)
PYPROJECT_FILE = os.path.join(DIRNAME, "../pyproject.toml")
Expand All @@ -14,10 +15,7 @@
version = tomllib.load(f)["project"]["version"]
for file in CARGO_TOML_FILES:
with open(file, "r") as f:
lines = f.readlines()
content = f.read()
content = re.sub(r"##VERSION##", version, content)
with open(file, "w") as f:
for line in lines:
if line.startswith("version"):
f.write(f'version = "{version}"\n')
else:
f.write(line)
f.write(content)

0 comments on commit c6ec0d6

Please sign in to comment.