Skip to content

Commit bc9cf18

Browse files
authored
Merge pull request #329 from meilisearch/fix-examples-package
Fix examples package
2 parents 62d1115 + 26e7467 commit bc9cf18

15 files changed

+97
-25
lines changed

β€Žconvert-to-heed3.shβ€Ž

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ set -e
1414
# the heed folder...
1515
if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
1616
cp heed3\\Cargo.toml heed\\Cargo.toml
17+
rm -rf heed\\examples
18+
cp -R heed3\\examples heed\\examples
1719
else
1820
cp heed3/Cargo.toml heed/Cargo.toml
21+
rm -rf heed/examples
22+
cp -R heed3/examples heed/examples
1923
fi
2024

2125
# ...and replaces the `heed::` string by the `heed3::` one.
22-
for file in $(find heed/src -type f -name "*.rs") examples/prev-snapshot.rs; do
26+
for file in $(find heed/src -type f -name "*.rs"); do
2327
if [[ "$OSTYPE" == "darwin"* ]]; then
2428
sed -i '' 's/heed::/heed3::/g' "$file"
2529
else
@@ -31,6 +35,13 @@ done
3135
git config --local user.email "[email protected]"
3236
git config --local user.name "The CI"
3337

38+
# Adds the new examples to the changes
39+
if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
40+
git add heed\\examples
41+
else
42+
git add heed/examples
43+
fi
44+
3445
# But only commit if there is something to commit
3546
git diff -q --exit-code || git commit -am 'remove-me: heed3 changes generated by the convert-to-heed3.sh script'
3647

β€Žheed/Cargo.tomlβ€Ž

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ keywords = ["lmdb", "database", "storage", "typed"]
99
categories = ["database", "data-structures"]
1010
readme = "../README.md"
1111
edition = "2021"
12-
include = [
13-
"../examples/all-types.rs",
14-
"../examples/clear-database.rs",
15-
"../examples/cursor-append.rs",
16-
"../examples/custom-comparator.rs",
17-
"../examples/multi-env.rs",
18-
"../examples/nested.rs",
19-
"../examples/rmp-serde.rs",
20-
]
2112

2213
[dependencies]
2314
bitflags = { version = "2.9.0", features = ["serde"] }
@@ -113,41 +104,30 @@ longer-keys = ["lmdb-master-sys/longer-keys"]
113104
# <https://github.com/LMDB/lmdb/blob/f20e41de09d97e4461946b7e26ec831d0c24fac7/libraries/liblmdb/mdb.c#L205-L218>
114105
use-valgrind = ["lmdb-master-sys/use-valgrind"]
115106

116-
# Examples are located outside the standard heed/examples directory to prevent
117-
# conflicts between heed3 and heed examples when working on both crates.
118107
[[example]]
119108
name = "all-types"
120-
path = "../examples/all-types.rs"
121109

122110
[[example]]
123111
name = "clear-database"
124-
path = "../examples/clear-database.rs"
125112

126113
[[example]]
127114
name = "cursor-append"
128-
path = "../examples/cursor-append.rs"
129115

130116
[[example]]
131117
name = "custom-comparator"
132-
path = "../examples/custom-comparator.rs"
133118

134119
[[example]]
135120
name = "custom-dupsort-comparator"
136-
path = "../examples/custom-dupsort-comparator.rs"
137121

138122
[[example]]
139123
name = "multi-env"
140-
path = "../examples/multi-env.rs"
141124

142125
[[example]]
143126
name = "nested"
144-
path = "../examples/nested.rs"
145127

146128
[[example]]
147129
name = "prev-snapshot"
148-
path = "../examples/prev-snapshot.rs"
149130

150131
[[example]]
151132
name = "rmp-serde"
152-
path = "../examples/rmp-serde.rs"
153133
required-features = ["serde-rmp"]
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.

0 commit comments

Comments
Β (0)