Skip to content

Commit f64d068

Browse files
committed
fix release
1 parent 4483ec5 commit f64d068

File tree

1 file changed

+19
-50
lines changed

1 file changed

+19
-50
lines changed

release.sh

Lines changed: 19 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ show_usage() {
1212
echo "Usage: ./release.sh <component> <version>"
1313
echo ""
1414
echo "Components:"
15-
echo " cli - Rust CLI (tag: v*)"
16-
echo " py - Python client (tag: py-*)"
15+
echo " cli - CLI + Python package (tag: v*)"
1716
echo " node - Node.js client (tag: node-*)"
1817
echo ""
1918
echo "Version:"
@@ -25,10 +24,10 @@ show_usage() {
2524
echo "Examples:"
2625
echo " ./release.sh cli 0.1.0"
2726
echo " ./release.sh cli patch"
28-
echo " ./release.sh py 0.1.0"
29-
echo " ./release.sh py minor"
3027
echo " ./release.sh node 1.0.0"
3128
echo " ./release.sh node patch"
29+
echo ""
30+
echo "Note: 'cli' releases both the CLI binaries and Python package together"
3231
}
3332

3433
get_cli_version() {
@@ -94,14 +93,16 @@ check_tag_exists() {
9493

9594
release_cli() {
9695
local version=$1
97-
local current=$(get_cli_version)
96+
local current_cli=$(get_cli_version)
97+
local current_py=$(get_py_version)
9898

99-
echo -e "${BLUE}CLI Release${NC}"
100-
echo "Current version: $current"
99+
echo -e "${BLUE}CLI + Python Release${NC}"
100+
echo "Current CLI version: $current_cli"
101+
echo "Current Python version: $current_py"
101102

102-
# Handle version bump
103+
# Handle version bump (based on CLI version)
103104
if [ "$version" = "patch" ] || [ "$version" = "minor" ] || [ "$version" = "major" ]; then
104-
version=$(bump_version "$current" "$version")
105+
version=$(bump_version "$current_cli" "$version")
105106
fi
106107

107108
validate_version "$version"
@@ -110,61 +111,32 @@ release_cli() {
110111
check_clean_git
111112
check_tag_exists "$tag"
112113

113-
echo -e "${YELLOW}Preparing CLI release $tag${NC}"
114+
echo -e "${YELLOW}Preparing release $tag (CLI + Python)${NC}"
114115

115116
# Update version in Cargo.toml
116117
echo "Updating Cargo.toml version to $version..."
117118
sed -i.bak "s/^version = \".*\"/version = \"$version\"/" Cargo.toml
118119
rm -f Cargo.toml.bak
119120

120-
# Commit and tag
121-
git add Cargo.toml
122-
git commit -m "chore: bump CLI version to $version"
123-
git tag -a "$tag" -m "CLI Release $version"
124-
125-
# Push
126-
git push
127-
git push origin "$tag"
128-
129-
echo -e "${GREEN}CLI release $tag pushed!${NC}"
130-
}
131-
132-
release_py() {
133-
local version=$1
134-
local current=$(get_py_version)
135-
136-
echo -e "${BLUE}Python Release${NC}"
137-
echo "Current version: $current"
138-
139-
# Handle version bump
140-
if [ "$version" = "patch" ] || [ "$version" = "minor" ] || [ "$version" = "major" ]; then
141-
version=$(bump_version "$current" "$version")
142-
fi
143-
144-
validate_version "$version"
145-
local tag="py-$version"
146-
147-
check_clean_git
148-
check_tag_exists "$tag"
149-
150-
echo -e "${YELLOW}Preparing Python release $tag${NC}"
151-
152121
# Update version in pyproject.toml
153122
echo "Updating pyproject.toml version to $version..."
154123
sed -i.bak "s/^version = \".*\"/version = \"$version\"/" sdk/python/pyproject.toml
155124
rm -f sdk/python/pyproject.toml.bak
156125

157126
# Commit and tag
158-
git add sdk/python/pyproject.toml
159-
git commit -m "chore: bump Python client version to $version"
160-
git tag -a "$tag" -m "Python Client Release $version"
127+
git add Cargo.toml sdk/python/pyproject.toml
128+
git commit -m "chore: bump CLI version to $version"
129+
git tag -a "$tag" -m "Release $version"
161130

162131
# Push
163132
git push
164133
git push origin "$tag"
165134

166-
echo -e "${GREEN}Python release $tag pushed!${NC}"
167-
echo "Package will be published to PyPI as: pg0-embedded"
135+
echo -e "${GREEN}Release $tag pushed!${NC}"
136+
echo ""
137+
echo "This will release:"
138+
echo " - CLI binaries to GitHub Releases"
139+
echo " - Python package to PyPI (pg0-embedded)"
168140
}
169141

170142
release_node() {
@@ -219,9 +191,6 @@ case $COMPONENT in
219191
cli)
220192
release_cli "$VERSION"
221193
;;
222-
py|python)
223-
release_py "$VERSION"
224-
;;
225194
node|nodejs)
226195
release_node "$VERSION"
227196
;;

0 commit comments

Comments
 (0)