Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions fetch-and-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ if [ -z "$VERSIONS" ]; then
fi

# Display versions and prompt user to select
echo ""
echo "Available Kubernetes versions:"
select VERSION in $VERSIONS; do
if [ -n "$VERSION" ]; then
echo ""
echo "Selected version: $VERSION"
break
else
Expand Down Expand Up @@ -56,7 +54,6 @@ if [ "$CURRENT_BRANCH" != "$EXPECTED_BRANCH" ]; then
fi

# 1. Fetch the OpenAPI spec
echo ""
echo "Step 1/3: Fetching OpenAPI spec for version $VERSION..."
$PYTHON -m lightkube-generate.fetch fetch "$VERSION"
if [ $? -ne 0 ]; then
Expand All @@ -65,7 +62,6 @@ if [ $? -ne 0 ]; then
fi

# 2. Update workflow file
echo ""
echo "Step 2/3: Updating GitHub workflow..."
$PYTHON -m lightkube-generate.fetch update-workflow "$VERSION"
if [ $? -ne 0 ]; then
Expand All @@ -74,21 +70,34 @@ if [ $? -ne 0 ]; then
fi

# 3. Update documentation
echo ""
echo "Step 3/3: Updating documentation..."
echo "Updating documentation..."
$PYTHON -m lightkube-generate.fetch update-docs "$VERSION"
if [ $? -ne 0 ]; then
echo "Failed to update docs"
exit 1
fi

# 4. Update README file
echo "Updating README..."
$PYTHON -m lightkube-generate.fetch update-readme "$VERSION"
if [ $? -ne 0 ]; then
echo "Failed to update readme"
exit 1
fi

# 4. Execute release script
# 5. Execute release script
bash release.sh "$VERSION"
if [ $? -ne 0 ]; then
echo "Release script failed"
exit 1
fi

echo ""
# 6. Delete old site direcotories
echo "Cleanup site directory..."
$PYTHON -m lightkube-generate.fetch cleanup-site "$VERSION"
if [ $? -ne 0 ]; then
echo "Failed to cleanup site directory"
exit 1
fi

echo "✓ All steps completed successfully for version $VERSION"
Loading