forked from google-gemini/gemini-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreapply-renaming.sh
More file actions
executable file
·36 lines (29 loc) · 1.55 KB
/
reapply-renaming.sh
File metadata and controls
executable file
·36 lines (29 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
echo "Re-applying package renaming from @google to @blocksuser..."
# Update package.json files
sed -i '' 's/"@google\/gemini-cli"/"@blocksuser\/gemini-cli"/g' package.json
sed -i '' 's/"@google\/gemini-cli"/"@blocksuser\/gemini-cli"/g' packages/cli/package.json
sed -i '' 's/"@google\/gemini-cli-core"/"@blocksuser\/gemini-cli-core"/g' packages/core/package.json
sed -i '' 's/"@google\/gemini-cli-core"/"@blocksuser\/gemini-cli-core"/g' packages/cli/package.json
# Remove private flag from root package.json
sed -i '' '/"private": "true",/d' package.json
# Update all source files
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.md" -o -name "*.yml" -o -name "*.json" \) \
-not -path "./node_modules/*" \
-not -path "./.git/*" \
-not -path "./bundle/*" \
-not -path "./dist/*" \
-not -path "./package-lock.json" \
-not -path "./packages/*/package-lock.json" \
-exec sed -i '' 's/@google\/gemini-cli-core/@blocksuser\/gemini-cli-core/g' {} \;
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.md" -o -name "*.yml" -o -name "*.json" \) \
-not -path "./node_modules/*" \
-not -path "./.git/*" \
-not -path "./bundle/*" \
-not -path "./dist/*" \
-not -path "./package-lock.json" \
-not -path "./packages/*/package-lock.json" \
-exec sed -i '' 's/@google\/gemini-cli/@blocksuser\/gemini-cli/g' {} \;
# Update the prepare-package.js script to not copy .npmrc
sed -i '' "/'.npmrc': '.npmrc',/d" scripts/prepare-package.js
echo "Done re-applying all changes!"