Skip to content

Commit dcbba7d

Browse files
committed
refactor: restructure the project based on programming language
1 parent a4af9d5 commit dcbba7d

32 files changed

+14
-11
lines changed
File renamed without changes.

Cargo.toml renamed to rust/Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[workspace]
22
members = [
33
"sdk",
4+
"ephemeral",
5+
"delegate",
6+
"commit-attribute"
47
]
58

69
resolver = "2"
@@ -17,9 +20,9 @@ readme = "./README.md"
1720
keywords = ["solana", "crypto", "delegation", "ephemeral-rollups", "magicblock"]
1821

1922
[workspace.dependencies]
20-
ephemeral-rollups-sdk-attribute-ephemeral-v2 = { path = "sdk/ephemeral", version = "=0.1.1" }
21-
ephemeral-rollups-sdk-attribute-delegate-v2 = { path = "sdk/delegate", version = "=0.1.1" }
22-
ephemeral-rollups-sdk-attribute-commit-v2 = { path = "sdk/commit_attribute", version = "=0.1.1" }
23+
ephemeral-rollups-sdk-attribute-ephemeral-v2 = { path = "ephemeral", version = "=0.1.1" }
24+
ephemeral-rollups-sdk-attribute-delegate-v2 = { path = "delegate", version = "=0.1.1" }
25+
ephemeral-rollups-sdk-attribute-commit-v2 = { path = "commit-attribute", version = "=0.1.1" }
2326

2427
## External crates
2528
anchor-lang = "0.30.1"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

sdk/Cargo.toml renamed to rust/sdk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ default = []
1616
anchor = ["anchor-lang"]
1717

1818
[dependencies]
19+
anchor-lang = { workspace = true, optional = true }
1920
borsh = { workspace = true }
2021
ephemeral-rollups-sdk-attribute-delegate-v2 = { workspace = true }
2122
ephemeral-rollups-sdk-attribute-ephemeral-v2 = { workspace = true }
2223
ephemeral-rollups-sdk-attribute-commit-v2 = { workspace = true }
2324
paste = { workspace = true }
2425
solana-program = { workspace = true }
25-
anchor-lang = { workspace = true, optional = true }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

version_align.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
# Step 1: Read the version from Cargo.toml
6-
version=$(grep '^version = ' Cargo.toml | head -n 1 | sed 's/version = "\(.*\)"/\1/')
6+
version=$(grep '^version = ' rust/Cargo.toml | head -n 1 | sed 's/version = "\(.*\)"/\1/')
77

88
if [ -z "$version" ]; then
99
echo "Version not found in Cargo.toml"
@@ -20,19 +20,19 @@ case "$(uname)" in
2020
esac
2121

2222
# Update the version for all crates in the Cargo.toml workspace.dependencies section
23-
sed "${sedi[@]}" -e '/\[workspace.dependencies\]/,/## External crates/s/version = ".*"/version = "='$version'"/' Cargo.toml
23+
sed "${sedi[@]}" -e '/\[workspace.dependencies\]/,/## External crates/s/version = ".*"/version = "='$version'"/' rust/Cargo.toml
2424

2525
# Update the version in clients/bolt-sdk/package.json
26-
jq --arg version "$version" '.version = $version' sdk/ts/package.json > temp.json && mv temp.json sdk/ts/package.json
26+
jq --arg version "$version" '.version = $version' ts/package.json > temp.json && mv temp.json ts/package.json
2727

2828
# Potential for collisions in Cargo.lock, use cargo update to update it
29-
cargo update --workspace
29+
cargo update --workspace --manifest-path rust/Cargo.toml
3030

3131
# Check if any changes have been made to the specified files, if running with --check
3232
if [[ "$1" == "--check" ]]; then
3333
files_to_check=(
34-
"sdk/ts/package.json"
35-
"Cargo.toml"
34+
"ts/package.json"
35+
"rust/Cargo.toml"
3636
)
3737

3838
for file in "${files_to_check[@]}"; do
@@ -43,4 +43,4 @@ if [[ "$1" == "--check" ]]; then
4343
fi
4444
done
4545
exit 0
46-
fi
46+
fi

0 commit comments

Comments
 (0)