Skip to content

Commit cf9661a

Browse files
authored
Improve extension extraction documentation (zed-industries#24590)
- Add .gitignore - Update extension.toml URL - Script cleanup of Cargo.toml workspace lines
1 parent c5fe5f1 commit cf9661a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

extensions/EXTRACTION.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,19 @@ OLD_VERSION=$(grep '^version = ' extension.toml | cut -d'"' -f2)
112112
NEW_VERSION=$(echo "$OLD_VERSION" | awk -F. '{$NF = $NF + 1;} 1' OFS=.)
113113
echo $OLD_VERSION $NEW_VERSION
114114
perl -i -pe "s/$OLD_VERSION/$NEW_VERSION/" extension.toml
115+
perl -i -pe "s#https://github.com/zed-industries/zed#https://github.com/zed-extensions/${LANGNAME}#g" extension.toml
115116

116117
# if there's rust code, update this too.
117-
test -f Cargo.toml && perl -i -pe "s/$OLD_VERSION/$NEW_VERSION/" cargo.toml
118+
test -f Cargo.toml && perl -i -pe "s/$OLD_VERSION/$NEW_VERSION/" Cargo.toml
119+
# remove workspace Cargo.toml lines
120+
test -f Cargo.toml && perl -ni -e 'print unless /^.*(workspace\s*=\s*true|\[lints\])\s*$/' Cargo.toml
118121
test -f Cargo.toml && cargo check
119122

123+
# add a .gitignore
124+
echo "target/
125+
grammars/
126+
*.wasm" > .gitignore
127+
120128
# commit and push
121129
git add -u
122130
git checkout -b "bump_${NEW_VERSION}"

0 commit comments

Comments
 (0)